Retrieve supported scanner names from a scanner driver.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_get_scan_description( LPAT_ISIS_FILEFIND lpFindInfo, INT nScanner, LPSTR lpszDescription ); |
Name | Type | Description |
---|---|---|
lpFindInfo | LPAT_ISIS_FILEFIND | The file description structure returned by a FileFindFirst or FileFindNext call. |
nScanner | INT | Specifies an index into the list of scanner names. |
lpszDescription | LPSTR | String to be filled in with the name of the scanner at index nScanner. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
This function does not process image pixels.
IG_ISIS_drv_get_scan_description gets the names of scanner devices supported by a scanner driver.
Use FileFindFirst and FileFindNext to find the list of scanner drivers for which you wish to retrieve names. You may then use IG_ISIS_drv_get_scan_description to get the name strings for all the supported devices from a particular scanner driver. This information can be used to build your own scanner selection dialog.
Since ISIS drivers are installed in the WINDOWS\PIXTRAN directory, you should use the FileFind functions to locate all the driver files in that directory. ISIS drivers end with a .PXW extension in Windows 3.x and Windows 95. The driver extension is .PXN in Windows NT. However, since this directory contains ISIS compression and file drivers as well as scanner drivers, you will encounter many errors when calling IG_ISIS_drv_get_scan_description. This is to be expected and should not alarm you. Simply skip over non-scanner ISIS drivers when you find them.
When retrieving scanner names from a particular driver, start with iScanner at 0 and increment the index for each subsequent call to IG_ISIS_drv_get_scan_description until you get an error. This siginifies that you have read in all the supported scanner names for that driver.
This function is provided for those who wish to create their own scanner selection dialog instead of using the built-in scanner selection dialog accessible through IG_ISIS_drv_set_scan_name. If you wish your scanner selection dialog to be compatible with the IG_ISIS_drv_set_scan_name and IG_ISIS_drv_get_scan_name functions, you should do the following:
Copy Code
|
|
---|---|
IG_ISIS_env_put(0, "Scanner", "Driver", szDriverName); |
Copy Code
|
|
---|---|
IG_ISIS_env_put (0, szDriverName, "Model", szScannerModelName);
|
where szDriverName is the name of the driver without the extension, and szScannerModelName is the name of the scanner actually selected.
Copy Code
|
|
---|---|
IG_ISIS_env_get (0, "Scanner", "Driver", szDriverName, sizeof(szDriverName)); |