Mtmicrsettimeout – MagTek IMAGESAFE99875500 User Manual
Page 40

ImageSafe Windows API Specifications
32
MTMICRSetTimeout
MTMICRSetTimeout function sets a duration for timeout in case there is a communication problem with the ImageSafe
device. MTMICRProcessCheck, MTMICRGetImage, MTMICRGetImages, and MTMICRQueryInfo functions use this
timeout value to wait for the device to respond. This timeout should be greater than the total time required to wait for a check
feed, check movement along the path, and image processing. A recommended time is 30 seconds.
Note
This time must always be longer than DocFeedTimeout
when used (see ProcessOptions in Section 5)
ULONG MTMICRSetTimeout (
DWORD
dwMilliSeconds
);
Parameters
Duration for timeout. The timeout is in milliseconds unit.
dwMilliSeconds
Return Values
No return value for this function.
Example
#define DEVICE_NAME_LEN 128
int i=1;
DWORD dwResult;
char cDeviceName[DEVICE_NAME_LEN]="";
while ((dwResult = MTMICRGetDevice(i,(char*) cDeviceName)) !=
MICR_ST_DEVICE_NOT_FOUND)
{
if (MTMICROpenDevice (cDevicesNames) == MICR_ST_OK)
{
// Set timeout
MTMICRSetTimeout (15000); // 15 seconds
///close the device
}
i++;
}