Using the LEADTOOLS THUNK Utility with TWAIN

The LEADTOOLS Twain Thunk was created to enable you to interact with Win32 TWAIN drivers from a 64-Bit process. For instance, a Scanner driver that is ONLY supported on a 32-Bit environment will not be able to interact with your scanner from a 64-Bit process application. The LEADTOOLS Twain Thunk Server will allow you to do so.

To use the LEADTOOLS TWAIN Thunk Server in your .NET application, pass the UseThunkServer flag to the flags parameter to the TwainSession.Startup or TwainSession.Startup2 methods. The rest of your application code remains unaffected.

Distribution Files

Additional files need to be included in distribution files for your application when using the LEADTOOLS TWAIN Thunk Server framework:

File Description

COM+ Thunk Server


Helper for LEADTOOLS TWAIN library


32-Bit helper DLL for the LEADTOOLS CDLL framework


64 bit helper DLL for the LEADTOOLS CDLL framework


32-Bit TWAIN library


32-Bit kernel library


32-Bit filter library


32-Bit BMP filter library


32-Bit CMP filter library


32-Bit RAW filter library


32-Bit TIF filter library

Deploying the LEADTOOLS TWAIN Thunk Server

The LEADTOOLS TWAIN Thunk Server is based on COM+ technology. Register the server as part of the setup procedure for your application. Perform the following steps to register the LEADTOOLS TWAIN Thunk Server that ships with the LEADTOOLS .NET Class Library:

  1. Run the Windows Command prompt with Administrator privileges

  2. Run the following command:

[LEADTOOLS Installation Folder]"\Bin\Common\LEADTOOLS Thunk\LtThunkServer.exe" /regserver

These exact steps are used by the LEADTOOLS Installation program during setup. Your application's setup should do something similar.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Imaging, Medical, and Document