SECTION 3. EXPRESSCARD 1000 API
MTECSDK_GetDevice
MTECSDK_GetDevice
function returns the device name of the device present in the system.
ULONG MTECSDK_GetDevice (
DWORD dwDeviceContext,
char
*pcDevName
);
Parameters
dwDeviceContext
This is the device number of the device. This must be set to 1 to get the first device in the system. Increment it by 1 to get
the next device name.
pcDevName
Pointer to the buffer where the device name will be stored.
Return Values
EC_ST_OK
EC_ST_DEVICE_NOT_FOUND
EC_ST_BAD_PARAMETER
Remarks
If the function succeeds, the return value is EC_ST_OK. The device name of the device is filled in the buffer pointed by the
parameter pcDevName.
If there is no device present or there is no device that is associated with the given dwDeviceContext, then the function fails and
EC_ST_DEVICE_NOT_FOUND is returned.
If there is no memory allocated for the pcDevName parameter, then EC_ST_BAD_PARAMETER is returned.
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)
{
// Device found, increment the device number
i++;
}
Содержание EXPRESSCARD 1000
Страница 6: ......