LEADTOOLS TWAIN toolkits support both the TWAIN 1.9 and the TWAIN 2.x specifications, as follows:
TWAIN 2.x specification - Version 2.x supports both 32- and 64-bit operating systems and uses the twaindsm.dll. Version 2.x is supposed to be backward-compatible.
On machines running 32-bit operating systems, the DLL is in the Windows\System32 directory.
On machines running 64-bit operating systems, the 32-bit version of this DLL is in the Windows\SysWOW64 directory, while the 64-bit version of this DLL is in the Windows\System32 directory. The 64-bit version is a “true” 64-bit DLL rather than a 32-bit DLL modified to run on a 64-bit operating system.
By default the toolkit automatically checks for TWAIN 2.x support, and tries to load the TWAIN 2.x DLL if it is supported. If that fails or if the scanner is not compatible with TWAIN 2.x, it will try to start TWAIN 1.9.
Call L_TwainGetVersion to determine which TWAIN specification is currently being used by the LEADTOOLS TWAIN toolkit.
It is also possible to explicitly set which version the selected device will use. To do so, call L_TwainSetVersion and pass “TWAIN_VERSION1” to use version 1.9, or “TWAIN_VERSION2” to use version 2.x.
Note: Calling L_TwainSetVersion changes the toolkit's behavior. L_TwainSetVersion turns responsibility for performing driver/data source compatibility checks over to the user for the rest of the session, instead of letting the toolkit handle that automatically itself. If L_TwainSelectSource is called AFTER calling L_TwainSetVersion, automatic version checking will not be performed. A different source can still be selected, but the toolkit will continue to use the version of TWAIN that was set by L_TwainSetVersion. This is useful when the TWAIN 2.x DLL is installed on the system, but for some reason that version does not work correctly with a TWAIN device which uses the TWAIN 1.9 specification. For more information, refer to Managing the TWAIN Source.