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

Display scanner selection dialog box.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_set_scan_name(
        HWND hWnd
);

Arguments:

Name Type Description
hWnd HWND A handle to the parent window.

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.

Example:

See the example for IG_ISIS_drv_set_dialog.

Remarks:

The IG_ISIS_drv_set_scan_name function displays a predefined dialog box that allows the user to choose a scanner, add a scanner, or configure a scanner.

Calling IG_ISIS_drv_set_scan_name displays a dialog box that allows the user to choose a scanner from among all the ISIS scanner drivers that can be found on the user's system. When this function is called, PIXDFLT looks for drivers in WINDOWS\PIXTRAN and other places. To guarantee future compatibility and version control, ImageGear now requires locating all scanner drivers in WINDOWS\PIXTRAN.

PIXDFLT keeps track of the currently-selected scanner by making an entry under the [Scanner] heading in the SETSCAN.INI file which is created automatically and stored in the user's WINDOWS directory. IG_ISIS_drv_set_scan_name uses this information to highlight the currently-selected scanner, if any.

Your application can take advantage of the built-in scanner selection dialogs by adding a Select Scanner command to its File menu (or some other suitable menu) that calls IG_ISIS_drv_set_scan_name.

Note that IG_ISIS_drv_set_scan_name selects the scanner driver, but does not try to communicate with the scanner. The application can call IG_ISIS_drv_get_scan_name to retrieve the selected scanner name after setting it with IG_ISIS_drv_set_scan_name. Each time a scanner driver is selected, a section for that scanner is created in the user's SETSCAN.INI file. The first entry in this section is "Setup=No" which indicates that no scanner setup has ever been performed on this user's system.

Buttons along the right edge of the dialog perform the following predefined operations:

Add Displays the Add Scanner dialog box which allows the user to install additional scanner drivers supplied either by Accusoft or by companies that develop and market ISIS scanner drivers.
Setup... Loads the selected scanner driver and displays a scanner-specific configuration dialog box that allows configuration of SCSI addresses, I/O addresses, interrupts, and other parameters required by the scanner communication link, as well as the paper size to be used by default. Once configuration information is determined for a particular scanner, it is saved under a scanner-specific section name in the SETSCAN.INI file. All scanners ever selected by a user will appear in this SETSCAN.INI file, each in their own section. When the user clicks OK and closes this dialog box, the entries specified in each window of the dialog box are saved in the scanner-specific section of the SETSCAN.INI file. The line "Setup=No" is changed to "Setup=Yes" and the scanner driver is unloaded. 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. Note that this dialog box can be displayed independently by using theIG_ISIS_drv_configurefunction.
Filters... Displays the predefined Filter Selection dialog box, which allows users to enable and disable image-enhancement filters, if any, that are available for the selected scanner. : Information about selected filters is saved in the scanner-specific section of the SETSCAN.INI file.

It is recommended that you unload any currently loaded scanner drivers before calling IG_ISIS_drv_set_scan_name. The user may want to add a newer version of the currently selected driver from a different directory. If you did not unload that driver from memory prior to calling IG_ISIS_drv_set_scan_name, the user would be prevented from doing so.

If the user selects a scanner that has never been selected, does not click the Setup button, and then click OK to close the Scanner Selection dialog box, the toolkit checks the SETSCAN.INI file, finds the scanner-specific entry that says "Setup=No" and invokes the Setup dialog box.

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

See Also:

IG_ISIS_drv_configure

IG_ISIS_drv_get_scan_name

IG_ISIS_drv_load

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