Setting which TWAIN Specification Version to use

LEADTOOLS TWAIN toolkits support both the TWAIN 1.9 and the TWAIN 2.x specifications, as follows:

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.

See Also

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS TWAIN C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.