ImageGear for C and C++ on Windows v19.7 - Updated
Make ISIS Pipes
User Guide > How to Work with... > Common Operations > Scanning > ISIS Scanning > Make ISIS Pipes

There are a number of steps you must perform before an ISIS driver will do any work for you. All of these steps must be performed in order, and each must succeed. If you do not do any particular step, or do not check that a step has succeeded, your application will almost certainly fail at some point.

To use an ISIS pipe, you must call at least the following functions:

In addition to these functions, you use IG_ISIS_drv_link to link drivers into ISIS pipes, IG_ISIS_tag_set... to send tags to the pipe to set parameters, and IG_ISIS_run_zone to invoke the pipe and make all drivers perform their intended functions.

IG_ISIS_drv_load

IG_ISIS_drv_load determines the driver to load and whether or not necessary permissions are present. If proper permissions are found, IG_ISIS_drv_load will try to load the driver from the <WINDIR>\PIXTRAN directory.

IG_ISIS_drv_init

After a driver is loaded, it must be initialized. If you attempt to do work with a driver that has not been initialized (even a IG_ISIS_drv_link), the application may crash. IG_ISIS_drv_init initializes a driver and optionally can pass parameters to it. For example, it is possible to initialize a file writing driver with the name of the file to write (but there are better ways of doing this by using tags).

IG_ISIS_drv_link

Once you have the desired drivers loaded and initialized, you use IG_ISIS_drv_link to link them into a pipe. Each IG_ISIS_drv_link call can link one driver to one other driver. Each subsequent driver to be linked requires a separate call to IG_ISIS_drv_link. You cannot directly link a driver to more than one other driver. (However, you will learn how to split a pipe in a later section.) The first driver in the pipe is also called the head driver.

IG_ISIS_tag_set...

To send tags to a pipe, the toolkit provides a set of IG_ISIS_tag_set ... functions. The most often used function is IG_ISIS_tag_set_long, which sets tags of type long, short, and byte. IG_ISIS_tag_set_ascii is used to set ASCII tags such as IG_ISIS_TAG_OUTPUTNAME (the name of the output file for a file writing driver).

Tags are not saved values - they are sent when the application calls the IG_ISIS_tag_set ... function. The driver(s) to which the tags are sent must already be linked. For example, you cannot call IG_ISIS_tag_set_ascii to set the filename on a pipe before the file writing driver is linked in.

Refer to the following functions: IG_ISIS_tag_set_ascii, IG_ISIS_tag_set_default(), IG_ISIS_tag_set_length(), IG_ISIS_tag_set_long(), IG_ISIS_tag_set_rational().

IG_ISIS_run_zone

IG_ISIS_run_zone invokes a pipe and must be called only after you have loaded, initialized, linked, and set tags on a pipe. It takes as its parameter the head driver of the pipe, and makes that driver perform the function for which it was designed. For example, IG_ISIS_run_zone will make a scanner driver scan a page, or a file reading driver read a page from a file.

IG_ISIS_drv_unload

After loading and initializing a driver, you generally do some amount of work with it. When you are finished with the driver, before exiting from your application, you must unlink and unload it from memory. The toolkit does not do this for you. To unlink a driver, you use zero as the parameter to IG_ISIS_drv_link because there is no corresponding unlink function. To unload a driver, call IG_ISIS_drv_unload and pass in the driver handle. You must unlink a driver completely from a pipe before unloading it.