ImageGear Professional v18.2 > 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.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_configure( HISISDRV hDriver, HWND hWnd ); |
Name | Type | Description |
hDriver | HISISDRV | The driver from which to display configuration dialog box. |
hWnd | HWND | A handle to a parent window. |
Error count.
This function does not process image pixels.
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); |
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:
Copy Code
|
|
---|---|
IG_ISIS_choice_get_count(hDriver, IG_ISIS_TAG_CONFIGURATIONS, lpwCount); |
Copy Code
|
|
---|---|
IG_ISIS_choice_get_ascii(hDriver, IG_ISIS_TAG_CONFIGURATIONS, wIndex, lpszValue); |
Copy Code
|
|
---|---|
IG_ISIS_choice_get_count(hDriver, IG_ISIS_TAG_CONFIG_1, lpwCountI); |
Copy Code
|
|
---|---|
IG_ISIS_choice_get_ascii(hDriver, IG_ISIS_TAG_CONFIG_1, wIndex, lpszValue); |
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. |