ImageGear for C and C++ on Windows v20.1 - Updated
Handle ISIS Errors
User Guide > How to Work with ... > Common Operations > Viewing > Scanning > ISIS Scanning > More ISIS Characteristics > Handle ISIS Errors

There are several functions in the toolkit that are critical to proper and well-behaved scanning and image handling. In writing your application, you should not assume that any of these critical functions complete without error. You should check for errors at each step.

Here is an example of how an error could cause a system crash if undetected:

  1. Your application needs to load a scanner driver, initialize it, and link it with a pipe.
  2. You set up a IG_ISIS_drv_load() function to load the scanner driver, and do not check whether or not the driver actually loaded.
  3. A user of your application does not have the proper permissions to use the scanner driver, but selects it anyway.
  4. Your application thinks the driver is loaded and tries to initialize it.
  5. Since the driver is not loaded, some other, perhaps critical system data in memory is "initialized" with tags that were intended to be sent to the driver.

In addition to standard programming practices of checking return values from functions, the toolkit has built-in error reporting features that can produce textual error messages for the user.

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