ImageGear for C and C++ on Windows v20.5 - Updated
IG_ISIS_drv_run_step
API Reference Guide > ISIS Component API Reference > ISIS Component Functions Reference > Single-Step Driver Control Functions > IG_ISIS_drv_run_step

Transfer another buffer of data through an ISIS pipe.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_ISIS_drv_run_step(
        HISISDRVRUN hRun,
        LPBYTE lpBuffer,
        WORD wCount,
        AT_MODE nFlags
);

Arguments:

Name Type Description
hRun HISISDRVRUN The handle of the "run" (zone data structure) being processed. This handle is initialized by the IG_ISIS_drv_run_start function that invoked the pipe.
lpBuffer LPBYTE A pointer to the buffer that will hold the data to be transferred during the operation.
wCount WORD The number of bytes to transfer during each IG_ISIS_drv_run_step.
nFlags AT_MODE

A flag that specifies whether or not to wait until the number of bytes specified in wCount is available before transferring the data. The values of nFlags are as follows:

  • IG_ISIS_DRV_DATAWAIT or 0 Wait until wCount bytes are available or IG_ISIS_ERR_ENDZONE occurs before transferring any data.
  • IG_ISIS_DRV_DATANOWAIT Return as many bytes as are immediately available or wCount bytes, whichever is less. Note that with many scanner drivers, IG_ISIS_drv_put_data waits for wCount bytes even when nFlags is set to IG_ISIS_DRV_DATANOWAIT.

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:

Depends on the scanner driver.

Example:

See IG_ISIS_drv_run_start examples.

Remarks:

IG_ISIS_drv_run_step transfers a specified number of bytes or all available bytes through the ISIS pipe.

IG_ISIS_drv_run_step should only be called after calling IG_ISIS_drv_run_start. Also, if any parameters need to be set prior to invoking the ISIS pipe, IG_ISIS_drv_run_zone must be called after IG_ISIS_drv_run_start and before IG_ISIS_drv_run_step. Then, IG_ISIS_drv_run_step is called repeatedly until it returns a value of IG_ISIS_ERR_ENDZONE indicating that the run is complete. After all data is transferred, IG_ISIS_drv_run_done must be called to complete the run.

The iCount parameter of IG_ISIS_drv_run_step can be set as follows:

  1. If you are putting data into an ISIS pipe, the maximum buffer size is (32K-1 bytes).
  2. If you are only processing an ISIS pipe, but not putting data into it, you can use any value that fits in with your application's memory environment; an 8K byte buffer is the correct size to use.
  3. If you are reading data out of the first driver in an ISIS pipe, the maximum buffer size is (32K-1) bytes.
You must check the return value of the IG_ISIS_drv_put_data and wait for IG_ISIS_ERR_ENDZONE before assuming data transfer is complete. Some three-pass color scanners take minutes to reset after each pass. Furthermore, when each pass completes, depending on the driver and the status of the wWait flag, you may get the remainder of the bytes from the current pass, or you may not get the remainder of the bytes until the scanner has completed enough of the next pass to give you wCount bytes (in which case part of the data in lpcBuffer will be one color and part will be another color).

IG_ISIS_drv_run_done can be called before IG_ISIS_drv_run_step has returned IG_ISIS_ERR_ENDZONE to stop zone processing. This is useful in implementing, for example, a "Cancel Scan" button.

IG_ISIS_drv_run_step is one of the basic components of IG_ISIS_drv_run_zone. It is one of four functions that when used together invoke an ISIS pipe. Invoking a pipe starts a scanning, reading, writing, compression, or other operation as defined by the drivers linked in the pipe.

See Also:

IG_ISIS_drv_run_done

IG_ISIS_drv_run_start

IG_ISIS_drv_run_zone

Is this page helpful?
Yes No
Thanks for your feedback.