Mtmicrgetimage, Parameters, Return values – MagTek Excella Windows API99875313 User Manual
Page 36: Remarks, Example

Excella Windows API Specifications
28
MTMICRGetImage
MTMICRGetImage function sends to the given device name a request for image data results from a previously
scan .
ULONG MTMICRGetImage (
char
*pcDevName,
char
*pcImageID,
char
*pcBuffer,
DWORD
*pdwLength
);
Parameters
pcDevName
Pointer to null terminated string containing device name.
pcImageID
the identification of the requested image
pcBuffer
Pointer to buffer for storing the image data.
pdwLength
Specifies the size of the pcBuffer.
Return Values
MICR_ST_OK
MICR_ST_DEVICE_NOT_RESPONDING
MICR_ST_IMAGE_NOT_FOUND
MICR_ST_NOT_ENOUGH_MEMORY
MICR_ST_UNKOWN_ERROR
Remarks
If the function succeeds, MICR_ST_OK is returned.
If the requested image is not found, MICR_ST_IMAGE_NOT_FOUND is returned.
If the device fails to respond to the command, the return value is MICR_ST_DEVICE_NOT_RESPONDING.
If the size of the buffer uses to store the image is not large enough, MICR_ST_NOT_ENOUGH_MEMORYis
returned.
Example
#define BUFFER_LEN 512
// DocInfo is returned by the MTMICRProcessCheck()
void GetNthImages (char *Device, unsigned int nIndex, char *DocInfo)
{
char key [512];
DWORD bufferSize;
char cValue[BUFFER_LEN]="";
DWORD nValueSize;