ImageGear for C and C++ on Windows v19.0
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.

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback