Your browser does not allow scripts
Please click here to view a static table of contents without scripts
FT_GetDriverVersion
Return to Introduction  Previous page  Next page
This function returns the D2XX driver version number.

FT_STATUS
FT_GetDriverVersion
(FT_HANDLE ftHandle, LPDWORD lpdwDriverVersion)




Parameters
ftHandle
Handle of the device.
lpdwDriverVersion
Pointer to the driver version number.




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



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, driver version "3.01.02" is represented as 0x00030102. Note that a device has to be opened before this function can be called.

Not available in Windows CE or Linux.



Example

This example shows how to call FT_GetDriverVersion.

FT_HANDLE ftHandle;
FT_STATUS status;
DWORD dwDriverVer;

//
// Get driver version
//

status = FT_Open(0,&ftHandle);
if (status == FT_OK) {
   status = FT_GetDriverVersion(ftHandle,&dwDriverVer);
   if (status == FT_OK)
      printf("Driver version = 0x%x\n",dwDriverVer);
   else
      printf("error reading driver version\n");
      FT_Close(ftHandle);
}