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

Remove a driver from memory.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_unload(
        HISISDRV hDriver
);

Arguments:

Name Type Description
hDriver HISISDRV The handle of the driver to unload.

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Example:

The following example loads, initializes, and links a set of drivers, performs some work, and then unlinks and unloads the drivers:

 
Copy Code
IG_ISIS_drv_load(0, szScanner, &hScan, 0);IG_ISIS_drv_init(hScan, szScanner, 0);IG_ISIS_drv_load_init_pipe(0, "RAS2RUN | RUN2G4 | PIXFPACK", &hPipe, 0);IG_ISIS_drv_link(hScan, hPipe);
/* Perform ISIS functions on pipe                                                       */
/*Unload the pipe                                                                                       */IG_ISIS_drv_link(hScan, 0);IG_ISIS_drv_unload(hScan);IG_ISIS_drv_unload_pipe(hPipe);

Remarks:

The IG_ISIS_drv_unload function removes a driver from memory and resets interrupt vectors and other system resources.

IG_ISIS_drv_unload must be called before terminating an application program for each driver loaded by IG_ISIS_drv_load or IG_ISIS_drv_load_init_pipe. If drivers are not unloaded by this function, then interrupt vectors and other system resources will not be properly reset. IamgeGear does not automatically unload any drivers. Drivers left in memory after your application terminates may continue to occupy memory.

IG_ISIS_drv_unload can be called at any time. It performs all necessary cleanup when unloading a driver.

Loading and unloading drivers takes processing time. Linking and unlinking loaded drivers takes virtually no processing time. For performance reasons, you may prefer to load most all necessary drivers at the beginning of an application, link and unlink as necessary without unloading, and then unload drivers only upon exiting the application.

See Also:

IG_ISIS_drv_load

IG_ISIS_drv_load_init_pipe

IG_ISIS_drv_unload_pipe