24#define WM_TWAIN_EVENT (WM_USER + 1)
27#define TWAIN_EVENT_NOTIFYHWND 0
30#define TWAIN_EVENT_REQUESTRESULT 1
33#define TWAIN_EVENT_NONE 10
34#define TWAIN_EVENT_QUIT 11
35#define TWAIN_EVENT_SCANNING 12
38#define TWAIN_EVENT_XFER 13
41#define WM_TWAIN_REQUEST (WM_USER + 2)
43#define TWAIN_REQUEST_QUIT 0
44#define TWAIN_REQUEST_SELECTSOURCE 1
45#define TWAIN_REQUEST_INITXFER 2
48#define WM_SHIM_INTERNAL (WM_USER + 200)
50template <
typename IntType> std::string
Num2Hex(IntType n)
52 std::stringstream sMsg;
53 sMsg <<
"0x" << std::uppercase << std::setfill(
'0') << std::setw(
sizeof(
n) * 2) << std::hex
60 std::stringstream sMsg;
61 sMsg << sFunc <<
" failed with Win32 error code " <<
Num2Hex(nWin32Error) <<
"!";
63 throw std::exception(sMsg.str().c_str());
std::string Num2Hex(IntType n)
void ThrowLastError(const char *sFunc)
void ThrowWin32Error(const char *sFunc, DWORD nWin32Error)