Section 3 – API DLL
MTECSDK_CloseDevice
MTECSDK_CloseDevice
function closes the device with the given device name.
ULONG MTECSDK_CloseDevice (
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
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++;
}
15
Содержание EXPRESSCARD 1000
Страница 6: ......