Initializing a TWAIN Session

To begin using the LEADTOOLS TWAIN toolkit, first initialize a TWAIN session handle (This handle is passed to many of the LEADTOOLS TWAIN C DLL functions, so this function must be called before calling other LEADTOOLS TWAIN functions.) To initialize a TWAIN session handle, call either the L_TwainInitSession or L_TwainInitSession2 function. Each call to either function will create an HTWAINSESSION session handle. L_TwainInitSession initializes the session without multi-threading or the THUNK server.  Use L_TwainInitSession2 to use multi-threading or to use the THUNK server. A THUNK server is needed  in order for a 64-bit application to work with a 32-bit TWAIN driver (if the device being used only has a 32-bit TWAIN driver).

After establishing the TWAIN session handle, the TWAIN source for acquiring images can be selected. For more information on this, refer to Managing the TWAIN Source

When the handle to the TWAIN session is no longer needed, free it by calling L_TwainEndSession. Each call to L_TwainInitSession or L_TwainInitSession2 must have a corresponding call to L_TwainEndSession.

For more information about using a THUNK server, refer to Using the LEADTOOLS THUNK Utility with TWAIN.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS TWAIN C API Help