ExpressCard 1000 Programming Reference
MTECSDK_OpenDevice
MTECSDK_OpenDevice
function opens the device with the given device name.
ULONG MTECSDK_OpenDevice (
char
*pcDevName
);
Parameters
pcDevName
Pointer to null terminated string that specifies the name of the device to open. Use function
MTECSDK_GetDevice
to
obtain the device name.
Return Values
If the function succeeds, the return value is EC_ST_OK.
EC_ST_OK
EC_ST_BAD_DEVICE_NAME
EC_ST_DEVICE_NOT_FOUND
EC_ST_DEVICE_NOT_RESPONDING
EC_ST_MSXML_NOT_FOUND
Remarks
If the pcDevName is NULL, the return value is EC_ST_BAD_DEVICE_NAME.
If no device is found, the return value is EC_ST_DEVICE_NOT_FOUND.
If MSXML is not installed, return value is EC_ST_MSXML_NOT_FOUND
If device is found but cannot connect, return value is EC_ST_DEVICE_NOT_RESPONDING
Example
#define DEVICE_NAME_LEN 128
int i=1;
DWORD dwResult;
char pcDevName[DEVICE_NAME_LEN]="";
while ((dwResult = MTECSDK_GetDevice(i,(char*) pcDevName)) != EC_ST_DEVICE_NOT_FOUND)
{
if (MTECSDK_OpenDevice (pcDevName) == EC_ST_OK)
{
///close the device
MTECSDK_CloseDevice (pcDevName);
}
i++;
}
14
Summary of Contents for EXPRESSCARD 1000
Page 6: ......