ImageGear for C and C++ on Windows v20.3 - Updated
IG_ISIS_drv_configure
API Reference Guide > ISIS Component API Reference > ISIS Component Functions Reference > Driver Communication and Setup Functions > IG_ISIS_drv_configure

Display driver configuration dialog box.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_configure(
        HISISDRV hDriver,
        HWND hWnd
);

Arguments:

Name Type Description
hDriver HISISDRV The driver from which to display configuration dialog box.
hWnd HWND A handle to a parent window.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

The following example shows how to use IG_ISIS_drv_configure to display the predefined scanner configuration dialog:

 
Copy Code
/* Load and configure the Fujitsu SCSI scanner driver */IG_ISIS_drv_load(0, &hDriver, "FUJIGINE", 0);IG_ISIS_drv_configure(hDriver, hWnd);

Remarks:

The IG_ISIS_drv_configure function displays a dialog box showing configuration information for a scanner and allowing the configuration information to be changed by the user.

hWnd must be a handle to a parent window.

A scanner may display zero or more configuration lists, such as default paper size, default SCSI address, default I/O address, etc. The toolkit includes a predefined configuration dialog box that can accommodate up to four configuration lists.

The built-in configuration dialog works automatically based on the configuration choices in the scanner driver. To implement a custom dialog box, it is necessary to do the following steps:

  1. Determine how many configuration lists exist in the driver:
     
    Copy Code
          IG_ISIS_choice_get_count(hDriver, IG_ISIS_TAG_CONFIGURATIONS, lpwCount);
    
  2. Get the names of the configuration lists by incrementing wIndex by 1 from 0 through lpwCount-1:
     
    Copy Code
          
          IG_ISIS_choice_get_ascii(hDriver, IG_ISIS_TAG_CONFIGURATIONS, wIndex, lpszValue);
    
  3. Get the number of items in the first list:
     
    Copy Code
          IG_ISIS_choice_get_count(hDriver, IG_ISIS_TAG_CONFIG_1, lpwCountI);
    
  4. Get the name of each item in the first list by incrementing wIndex by 1 from 0 through lpwCount-1:
     
    Copy Code
          
          IG_ISIS_choice_get_ascii(hDriver, IG_ISIS_TAG_CONFIG_1, wIndex, lpszValue);
    
  5. Repeat steps 3 and 4 for each configuration list (IG_ISIS_TAG_CONFIG_2, IG_ISIS_TAG_CONFIG_3,... IG_ISIS_TAG_CONFIG_n.

The built-in scanner configuration dialog box looks similar to this:

The IG_ISIS_drv_configure function works by loading (but not starting) the driver, polling the scanner, and letting the user select information in the dialog box (if the scanner allows this type of configuration). It then saves this information as ASCII text in a scanner-specific section of the SETSCAN.INI file. Prior to performing scanner configuration, the first entry of the scanner-specific section in this file is "Setup=No." When scanner configuration is complete, this entry changes to "Setup=Yes."

A side effect of loading the driver is that permissions are checked at this time. If the user does not have sufficient permissions to use the driver, an appropriate error message will appear and the driver will not be added to the SYSTEM.INI file.

When the user click OK, the dialog box closes and the scanner driver is unloaded.

Note that, under Windows, this dialog box also can be displayed by clicking Setup in the Scanner Selection dialog box.

Some scanners have no configuration parameters, or their configuration is set using an operating system level driver. In these cases, invoking the IG_ISIS_drv_configure function displays an appropriate message.

 

See Also:

IG_ISIS_drv_get_scan_name

IG_ISIS_drv_load

IG_ISIS_drv_set_scan_name

Is this page helpful?
Yes No
Thanks for your feedback.