|
DTWAIN_IsTwainAvailable |
Top Previous Next |
|
The DTWAIN_IsTwainAvailable function determines whether TWAIN is installed
DTWAIN_BOOL DTWAIN_IsTwainAvailable( );
Parameters None.
Return Values The return value is TRUE if TWAIN is installed. Otherwise FALSE is returned.
Comments The DTWAIN_IsTwainAvailable function should be called before attempting to call any other DTWAIN functions (except for the case defined below). Even though DTWAIN checks for TWAIN availability for most of the DTWAIN functions, by letting the application determine whether TWAIN is installed will allow the application to bypass any DTWAIN specific code, enable / disable TWAIN related options, etc.
The DTWAIN_IsTwainAvailable function will check to see if the Twain Data Source Manager, TWAIN_32.DLL or TWAINDSM.DLL, is available on the system path, or is in the current directory of the application (similar to how the Windows operating system searches for DLL's), and if found, a second test is made to see whether it is a legitimate Twain Data Source Manager (i.e. the DLL is not corrupted, and it contains the correct exported functions to qualify as a Twain Data Source Manager).
If the application being developed is 64-bit, DTWAIN_IsTwainAvailable will only look for the 64-bit version of TWAINDSM.DLL in an available path.
The DTWAIN_IsTwainAvailable function can be called before calling DTWAIN_SysInitialize.
TWAIN State Transitions None
Prerequisite Calls None.
Optional Prerequisite Calls None.
See Also |