|Top Previous Next|
The -dsmsearchorder parameter determines the directories and what order TwainSave will search these directories when attempting to load the TWAIN Data Source Manager (DSM). For more information on the DSM file, please refer to return code 2 and the DSM files that are necessary to run TWAIN applications.
The DSM is either TWAIN_32.DLL or TWAINDSM.DLL. Depending on your system, you may want TwainSave to look for one of these files using a specific directory search order.
The valid values for searchOrder are as follows:
So for example, a -dsmsearchorder value of 1 would search for the DSM file first in the WINDOWS directory, then if not found the PATH, and if not found there, the SYSTEM directory.
The terms WINDOWS, SYSTEM, and PATH are aliases to actual directories and searching locations. Here is a detailed description of each term:
The WINDOWS directory is the directory reported by your system to be the "Windows" directory. This is usually C:\Windows, but it may be different for your system.
The SYSTEM directory is the directory reported by your system to be the "System" directory. This is usually C:\Windows\System32, but it will be different depending on OS version and whether the system is a 64-bit system.
The PATH is the list of directories in your PATH environment variable. In actuality, the PATH is just one of the set of directories that will be searched when PATH is specified. When searching for DLL's, Windows goes through an extensive list of possible locations, where the PATH is one central location. To see the list of searches done by Windows, the following link describes the search logic:
Example: Search for TWAIN DSM in only the Windows directory and then acquire image using this DSM.
twainsave -dsmsearchorder 6 -filename test.bmp
If -dsmsearchorder is not specified, the search order is 0 (WINDOWS, SYSTEM, and then PATH).