Selecting TWAIN Data Source Manager |
Top Previous Next |
The TWAIN Data Source Manager (DSM) is the module that is responsible for routing TWAIN commands from DTWAIN to your manufacturer's TWAIN driver. This module comes in the form of a Dynamic Link Library.
On all 32-bit Windows operating systems, the DSM is TWAIN_32.DLL. This file is included when you install the Windows operating system. By default, 32-bit applications developed with DTWAIN will automatically use this DSM to communicate with your 32-bit TWAIN drivers. You usually find this file in your C:\Windows or C:\Windows\System32 directory, however differing environments (for example, Terminal Server environments) may place TWAIN_32.DLL in specific user directories.
For a 64-bit operating system and 64-bit TWAIN drivers, there is no DSM that comes installed for the operating system. Therefore, you are required to install the DSM yourself when deploying your 64-bit application. The 64-bit DSM is TWAINDSM.DLL. Without this file, you cannot communicate with 64-bit TWAIN drivers. This file can be installed in any directory accessible via the PATH environment variable, or the directory where you application executable is installed.
The above describes the default behavior for DTWAIN -- if developing a 32-bit application, the DSM used is TWAIN_32.DLL, and when developing a 64-bit application, the DSM is TWAINDSM.DLL. Your application doesn't have to select the DSM, as DTWAIN will select the correct DSM depending on the whether the application you've developed is 32 or 64 bit.
However, for 32-bit applications, it is possible for your application to use another version of the DSM. There is a special 32-bit version of TWAINDSM.DLL that you can use. The advantage in using the specialized 32-bit version of TWAINDSM.DLL is as follows:
Note that the 64-bit TWAINDSM.DLL has the advantages above, i.e. it is open source, and it has the updated methods of communicating with TWAIN drivers.
If you desire to use the 32-bit version of TWAINDSM.DLL, the DTWAIN_SetTwainDSM function allows you to do this. |