Supported Operating Systems by FT_Open

Mac OS X (10.4 and later)
Windows (2000 and later)
Windows CE (4.2 and later)
Open the device and return a handle which will be used for subsequent accesses.

Definition of FT_Open

FT_STATUS FT_Open (int iDevice, FT_HANDLE *ftHandle)

Parameters of FT_Open

iDevice       Index of the device to open. Indices are 0 based.
ftHandle      Pointer to a variable of type FT_HANDLE where the handle will be
stored. This handle must be used to access the device.

Return Value of FT_Open

FT_OK if successful, otherwise the return value is an FT error code.

Remarks about FT_Open

Although this function can be used to open multiple devices by setting iDevice to 0, 1, 2 etc. there is no
ability to open a specific device. To open named devices, use the function FT_OpenEx.

Example of FT_Open

FT_HANDLE ftHandle;
FT_STATUS ftStatus;
ftStatus = FT_Open(0,&ftHandle);
if (ftStatus == FT_OK) {
// FT_Open OK, use ftHandle to access device
else {
// FT_Open failed

© 版权声明
评论 抢沙发