2 - functions – MagTek EC2000 99875713 User Manual

Page 21

Advertising
background image

2 - Functions

ExpressCard 2000| Instant Issuance Card Personalization System | Programmer’s Reference (Windows SDK)

Page 21 of 21

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 MTECSDK_OpenDevice.

Return Values:
EC_ST_OK
EC_ST_BAD_DEVICE_NAME
EC_ST_DEVICE_NOT_FOUND

Remarks:
If the pcDevName is NULL, the return value is EC_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 = MTECSDK_GetDevice(i,(char*) pcDevName)) !=
EC_ST_DEVICE_NOT_FOUND)
{

// Success in getting the device name

// Open this device

if (MTECSDK_OpenDevice (pcDevName) == EC_ST_OK)

{

// Now close this device

MTECSDK_CloseDevice (pcDevName);

}

else

{

// Error while opening this device.

}


i++;

}

Advertising