Don't forget to include TWAIN...
More...
|
| use secure string functions if we have them |
| We want to use secure string functions whenever possible, if g++ every includes a set I think it would be excellent to switch over to it, but at least with Windows using them we stand a better chance of finding boo-boos...
|
|
|
#define | DllExport __declspec( dllexport ) |
| set system dll export configuration __declspec( dllexport )
|
|
#define | NCHARS(s) sizeof(s)/sizeof(s[0]) |
| The number of characters in a charter array.
|
|
#define | PATH_SEPERATOR '\\' |
| the operating system's symble used as a path seperator
|
|
#define | LOADLIBRARY(lib, hook, DSID) InstallTwain32DllHooks(lib,hook,DSID) |
| Call system loadibrary function. More...
|
|
#define | LOADFUNCTION(lib, func) GetProcAddress((HMODULE)lib, func) |
| Call system GetProcAddress function. More...
|
|
#define | UNLOADLIBRARY(hmodule, unhook, DSID) UninstallTwain32DllHooks((HMODULE)hmodule,unhook,DSID) |
| Call system FreeLibrary function. More...
|
|
#define | READ _read |
| OS abstraction macro that calls system _read function.
|
|
#define | CLOSE _close |
| OS abstraction macro that calls system _close function.
|
|
#define | SNPRINTF _snprintf_s |
| OS abstraction macro that calls system _snprintf function.
|
|
#define | UNLINK _unlink |
| OS abstraction macro that calls system _unlink function.
|
|
#define | STRNICMP _strnicmp |
| OS abstraction macro that calls system _strnicmp function.
|
|
#define | DSMENTRY TW_UINT16 FAR PASCAL |
| the DSM entry point type
|
|
#define | GETTHREADID ::GetCurrentThreadId |
| get the thread ID
|
|
#define | FOPEN(pf, name, mode) pf = _fsopen(name, mode, _SH_DENYNO) |
|
#define | kTWAIN_DS_DIR "twain_32" |
| The path to where TWAIN Data Sources are stored on the system.
|
|
#define | TWID_T TW_UINT32 |
|
#define | TWIDDEST_T TW_UINT32 |
|
|
HMODULE | InstallTwain32DllHooks (const char *const _lib, const bool _hook, const TWID_T _DSID) |
|
BOOL | UninstallTwain32DllHooks (const HMODULE _hmodule, const bool _unhook, const TWID_T _DSID) |
|
Don't forget to include TWAIN...
◆ FOPEN
#define FOPEN |
( |
|
pf, |
|
|
|
name, |
|
|
|
mode |
|
) |
| pf = _fsopen(name, mode, _SH_DENYNO) |
- Parameters
-
[out] | pf | pointer to the file to store the opened file |
[in] | name | the path and name of the file to open |
[in] | mode | the mode to open the file |
Definition at line 300 of file dsm.h.
◆ LOADFUNCTION
#define LOADFUNCTION |
( |
|
lib, |
|
|
|
func |
|
) |
| GetProcAddress((HMODULE)lib, func) |
Call system GetProcAddress function.
OS abstraction macro that tries to locate the addess of a funtion name.
- Parameters
-
[in] | lib | path and name of library |
[in] | func | name of the funtion |
Definition at line 288 of file dsm.h.
◆ LOADLIBRARY
#define LOADLIBRARY |
( |
|
lib, |
|
|
|
hook, |
|
|
|
DSID |
|
) |
| InstallTwain32DllHooks(lib,hook,DSID) |
Call system loadibrary function.
OS abstraction macro that tries to load a library.
- Parameters
-
[in] | lib | path and name of library |
[in] | hook | true if we want to attempt to hook this library |
[in] | DSid | if hooking is the ID of the DS we are hooking |
Definition at line 280 of file dsm.h.
◆ UNLOADLIBRARY
#define UNLOADLIBRARY |
( |
|
hmodule, |
|
|
|
unhook, |
|
|
|
DSID |
|
) |
| UninstallTwain32DllHooks((HMODULE)hmodule,unhook,DSID) |
Call system FreeLibrary function.
OS abstraction macro that tries to release the library.
- Parameters
-
[in] | lib | library modual to unload |
[in] | unhook | true if we want to attempt to unhook this library |
[in] | DSid | if unhooking is the ID of the DS we are unhooking |
Definition at line 281 of file dsm.h.