Determine whether or not a page is loaded in the scanner.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_is_page_loaded( HISISDRV hDriver, AT_LMODE lFlags, LPAT_LMODE lpResult ); |
Arguments:
hDriver | The handle of the scanner driver. | |
lFlags | A bit field that can contain one of the following values: | |
lFlags | Meaning | |
IG_ISIS_TAG_FEEDER_FEED | Determine whether or not a page is loaded in the feeder. | |
IG_ISIS_TAG_FEEDER_FLAT | Determine whether or not a page is loaded on the flatbed. (Currently no supported scanners support page detection on a flatbed.) | |
lpResult | A bit field that will contain the result of the IG_ISIS_drv_is_page_loaded function. The following bits are currently defined: | |
lpResult | Meaning | |
0 | If IG_ISIS_TAG_FEEDER_TELLFEED is not set, do not know whether or not a page is loaded. If IG_ISIS_TAG_FEEDER_TELLFEED is set, no page is loaded. | |
IG_ISIS_DRV_STACKNOPAGE | If IG_ISIS_TAG_FEEDER_TELLFEED is set, no page is loaded. | |
IG_ISIS_DRV_STACKPAGE | If IG_ISIS_TAG_FEEDER_TELLFEED is set, page is loaded. |
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 checks the scanner to determine whether or not it can report whether there is a page in the feeder, and then checks to see whether or not a page is loaded:
Copy Code | |
---|---|
DWORD dwBits;IG_ISIS_tag_get_long(hDriver, IG_ISIS_TAGIG_ISIS_TAG_FEEDER, 0, &dwBits); if (dwBits & IG_ISIS_FEEDER_TELLFEED) {IG_ISIS_drv_is_page_loaded(hDriver, IG_ISIS_FEEDER_FEED, &dwBits); if (dwBits & IG_ISIS_DRV_STACKPAGE); printf("There is a page ready in the feeder."); else printf("The feeder is empty."); } else printf("Can't tell if page is present."); |
Remarks:
The IG_ISIS_drv_is_page_loaded function checks to see whether or not a page is loaded on the scanner's flatbed or feeder (assuming the scanner supports this query).
IG_ISIS_drv_is_page_loaded queries a scanner driver and reports whether or not a page is loaded. Before using IG_ISIS_drv_is_page_loaded, you must include code that uses IG_ISIS_tag_get_long to determine the scanner's capabilities, as shown in the example below. If the scanner does not support telling whether or not a page is loaded in the feeder (when IG_ISIS_FEEDER_TELLFEED = FALSE), then lpdwResult will give zero (0) (can't tell if page is loaded).
The current implementation handles scanners with flatbed page sensors and feeder stack sensors. Future implementations may be enhanced with additional flags to handle hand scanners, frame grabbers, and other devices.
Do not set tags between the time that you call IG_ISIS_drv_is_page_loaded and you run the zone. Otherwise, on scanners that must commit a page to determine if a page is loaded, the tags you set will not correctly describe the buffered page that was obtained when the scanner tried to sense whether or not a page was loaded. |