FT_STATUS
|
FT_CreateDeviceInfoList
|
(LPDWORD lpdwNumDevs)
|
Parameters
lpdwNumDevs
|
Pointer to unsigned long to store the number of devices connected.
|
Return Value
FT_OK if successful, otherwise the return value is an FT error code.
Remarks
An application can use this function to get the number of devices attached to the system. It can then allocate space for the device information list and retrieve the list using FT_GetDeviceInfoList.
If the devices connected to the system change, the device info list will not be updated until FT_CreateDeviceInfoList is called again.
Example
This example shows how to call FT_CreateDeviceInfoList.
FT_STATUS ftStatus;
DWORD numDevs;
//
// create the device information list
//
ftStatus = FT_CreateDeviceInfoList(&numDevs);
if (ftStatus == FT_OK) {
printf("Number of devices is %d\n",numDevs);
}
else {
// FT_CreateDeviceInfoList failed
}