Initialize a driver.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_init( HISISDRV hDriver, LPSTR lpszName, AT_MODE nFlags ); |
Arguments:
hDriver | The handle of the driver to be initialized. |
lpszName | 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 | 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.