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

Page 51: Example

Advertising
background image

Section 3. Excella API


43

MTMICRSetLogFile

MTMICRSetLogFile creates a log file. All messages and errors created by all API functions will be logged in
this log file. By default, there is no log file.

HANDLE MTMICRSetLogFile (

char

*pcLogFile

);

Parmeters


pcLogFile

Pointer to a null terminated string containing the full pathname to the log file.

Return Values

If the function succeeds, a valid file handle to the log file is returned. If the function fails, then a NULL is
returned.


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)
{

//Get timeou
DWORD timeout;

MTMICRSetLogFile (“c:\\mtmicr.log”);
///close the device

}

i++;

}

Advertising