Mtmicropendevice, Parmeters, Return values – MagTek Excella Windows API99875313 User Manual
Page 24: Remarks, Example

Excella Windows API Specifications
16
MTMICROpenDevice
MTMICROpenDevice function opens the device with the given device name.
ULONG MTMICROpenDevice (
char
*pcDevName
);
Parmeters
pcDevName
Pointer to null terminated string that specifies the name of the device to open. Use function
MTMICRGetDevice to obtain the device name.
Return Values
If the function succeeds, the return value is MICR_ST_OK.
MICR_ST_OK
MICR_ST_BAD_PARAMETER
MICR_ST_DEVICE_NOT_FOUND
MICR_ST_DEVICE_NOT_RESPONDING
Remarks
If the pcDevName is NULL, the return value is MICR_ST_BAD_PARAMETER.
If no device is found, the return value is MICR_ST_DEVICE_NOT_FOUND.
Example
#define DEVICE_NAME_LEN 128
int i=1;
DWORD dwResult;
char pcDevName[DEVICE_NAME_LEN]="";
while ((dwResult = MTMICRGetDevice(i,(char*) pcDevName)) != MICR_ST_DEVICE_NOT_FOUND)
{
if (MTMICROpenDevice (pcDevName) == MICR_ST_OK)
{
// Process documents
///close the device
MTMICRCloseDevice (pcDevName);
}
i++;
}