Mtmicrsetlogfilehandle, Parmeters, Return values – MagTek Excella Windows API99875313 User Manual

Page 52: Example

Advertising
background image

Excella Windows API Specifications


44

MTMICRSetLogFileHandle


MTMICRSetLogFileHandle specifies a handle for a log file. All messages and errors created by all API functions
will be logged in the log file that has this specified handle. By default, there is no log file

VOID MTMICRSetLogFileHandle (

HANDLE

hFileHandle

);

Parmeters


hFileHandle

This is a handle to a file. All the API functions will log errors and information to this log file.

Return Values

Nothing is returned by this function.

Example


#define DEVICE_NAME_LEN 128
int i=1;
DWORD dwResult;
HANDEL fileHandle;
char cDeviceName[DEVICE_NAME_LEN]="";
while ((dwResult = MTMICRGetDevice(i,(char*) cDeviceName)) != MICR_ST_DEVICE_NOT_FOUND)
{

if (MTMICROpenDevice (cDevicesNames) == MICR_ST_OK)
{

//Get timeout
DWORD timeout;
HANDLE fileHandle;

// Create log file and save the handle in fileHandle

// Pass the handle of the log file

MTMICRSetLogFileHandle (fileHandle);
///close the device

// Close the log file

// Close the device

}

i++;

}

if (MTMICROpenDevice (cDevicesNames) == MICR_ST_OK)
{

// Process documents

///close the device
MTMICRCloseDevice (cDeviceName);

}

i++;

}

Advertising