ImageGear for C and C++ on Windows v19.6 - Updated
IG_ISIS_drv_get_scan_description
API Reference Guide > ISIS Component API Reference > ISIS Component Functions Reference > Driver Communication and Setup Functions > IG_ISIS_drv_get_scan_description

Retrieve supported scanner names from a scanner driver.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_get_scan_description(
        LPAT_ISIS_FILEFIND lpFindInfo,
        INT nScanner,
        LPSTR lpszDescription
);

Arguments:

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.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

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:

  1. Set the newly selected driver name in the scanning configuration file SETSCAN.INI with the function call:
     
    Copy Code
          IG_ISIS_env_put(0, "Scanner", "Driver", szDriverName);
    
  2. If the driver contains multiple scanner description strings, also set the newly selected scanner name in SETSCAN.INI within the section for that driver using the function call:
     
    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.

  3. Use the IG_ISIS_env_get function to retrive the driver name when you need it:
     
    Copy Code
          IG_ISIS_env_get (0, "Scanner", "Driver", szDriverName, sizeof(szDriverName));
    

See Also:

IG_ISIS_drv_get_scan_name

IG_ISIS_drv_set_scan_name

IG_ISIS_env_get

IG_ISIS_env_put