Mtmicrclosedevice, Parameters, Return values – MagTek Excella STX99875340 User Manual
Page 27: Remarks, Example

Section 3. Excella API
17
MTMICRCloseDevice
MTMICRCloseDevice function closes the device with the given device name.
ULONG MTMICRCloseDevice (
char
*pcDevName
);
Parameters
pcDevName
Pointer to null terminated string containing the name of the device to close. This is the
device that is
previously opened
using function MTMICROpenDevice.
Return Values
MICR_ST_OK
MICR_ST_BAD_DEVICE_NAME
MICR_ST_DEVICE_NOT_FOUND
Remarks
If the pcDevName is NULL, the return value is MICR_ST_BAD_DEVICE_NAME.
Example
#define DEVICE_NAME_LEN 128
int i=1;
DWORD dwResult;
char pcDevName[DEVICE_NAME_LEN]="";
// Get the device name at device number “i”
while ((dwResult = MTMICRGetDevice(i,(char*) pcDevName)) != MICR_ST_DEVICE_NOT_FOUND)
{
// Success in getting the device name
// Open this device
if (MTMICROpenDevice (pcDevName) == MICR_ST_OK)
{
// Now close this device
MTMICRCloseDevice (pcDevName);
}
else
{
// Error while opening this device.
}
i++;
}