Download D2XX Programmer`s Guide
Transcript
Document Reference No.: FT_000071
D2XX Programmer's Guide Version 1.3
Clearance No.: FTDI# 170
Remarks
A version number consists of major, minor and build version numbers contained in a 4-byte field
(unsigned long). Byte0 (least significant) holds the build version, Byte1 holds the minor version, and
Byte2 holds the major version. Byte3 is currently set to zero.
For example, D2XX DLL version "3.01.15" is represented as 0x00030115. Note that this function does
not take a handle, and so it can be called without opening a device.
Example
FT_STATUS ftStatus;
DWORD dwLibraryVer;
// Get DLL version
ftStatus = FT_GetLibraryVersion(&dwLibraryVer);
if (ftStatus == FT_OK)
printf("Library version = 0x%x\n",dwLibraryVer);
else
printf("error reading library version\n");
3.26 FT_GetComPortNumber
Supported Operating Systems
Windows (2000 and later)
Summary
Retrieves the COM port associated with a device.
Definition
FT_STATUS FT_GetComPortNumber (FT_HANDLE ftHandle, LPLONG lplComPortNumber)
Parameters
ftHandle
Handle of the device.
lplComPortNumber
Pointer to a variable of type LONG which receives the COM port number
associated with the device.
Return Value
FT_OK if successful, otherwise the return value is an FT error code.
Remarks
This function is only available when using the Windows CDM driver as both the D2XX and VCP drivers can
be installed at the same time.
If no COM port is associated with the device, lplComPortNumber will have a value of -1.
Example
FT_HANDLE ftHandle; // valid handle returned from FT_OpenEx
FT_STATUS ftStatus;
LONG lComPortNumber;
Copyright © 2011 Future Technology Devices International Limited
33