Mtmicrsettimeout, Parameters, Return values – MagTek Excella STX99875340 User Manual

Page 52: Example

Advertising
background image

Excella Windows API Specifications

42

MTMICRSetTimeout

MTMICRSetTimeout function sets a duration for timeout in case there is a communication problem with the Excella 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


dwMilliSeconds

Duration for timeout. The timeout is in milliseconds unit.

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++;

}

Advertising