ImageGear for C and C++ on Windows v19.6 - Updated
IG_ISIS_drv_init
API Reference Guide > ISIS Component API Reference > ISIS Component Functions Reference > Pipe Functions > IG_ISIS_drv_init

Initialize a driver.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_init(
        HISISDRV hDriver,
        LPSTR lpszName,
        AT_MODE nFlags
);

Arguments:

Name Type Description
hDriver HISISDRV The handle of the driver to be initialized.
lpszName LPSTR For most drivers, this parameter can either be the same as the string that was passed to IG_ISIS_drv_load when the driver was loaded or NULL (either will work). When initializing file reading drivers, lpszName may contain the name of the file to read. In previous versions of the toolkit, the application was required to insert a filename, and additionally was required to insert a comma prior to the filename (",filename"); otherwise, a bad parameter error would occur.
nFlags AT_MODE For most drivers, this parameter must be zero (0).

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:

The following example loads and initializes two drivers:

 
Copy Code
/* IG_ISIS_drv_init example */IG_ISIS_drv_load(0, "EKi50i60", &hScan, 0);IG_ISIS_drv_init(&hScan, "EKi50i60", 0);

Remarks:

The IG_ISIS_drv_init function is used to initialize a driver.

IG_ISIS_drv_init should be called immediately after IG_ISIS_drv_load and before any other functions. Because IG_ISIS_drv_load usually doesn't communicate with the driver. if the driver cannot communicate properly with its target, then IG_ISIS_drv_load will succeed. But because IG_ISIS_drv_init tries to communicate with the driver, it will fail if there is a communication problem.

See Also:

IG_ISIS_drv_link

IG_ISIS_drv_load

IG_ISIS_drv_load_init_pipe