FT_STATUS
|
FT_EE_ReadEx
|
(FT_HANDLE ftHandle, PFT_PROGRAM_DATA pData, char *Manufacturer, char *ManufacturerId, char *Description, char *SerialNumber)
|
Parameters
ftHandle
|
Handle of the device.
|
pData
|
Pointer to a structure of type FT_PROGRAM_DATA.
|
*Manufacturer
|
Pointer to a null-terminated string containing the manufacturer name.
|
*ManufacturerID
|
Pointer to a null-terminated string containing the manufacturer ID.
|
*Description
|
Pointer to a null-terminated string containing the device description.
|
*SerialNumber
|
Pointer to a null-terminated string containing the device serial number.
|
Return Value
FT_OK if successful, otherwise the return value is an FT error code.
Remarks
This variation of the standard FT_EE_Read function was included to provide support for languages such as LabVIEW where problems can occur when string pointers are contained in a structure.
This function interprets the parameter pData as a pointer to a struct of type FT_PROGRAM_DATA that contains storage for the data to be read from the EEPROM.
The function does not perform any checks on buffer sizes, so the buffers passed in the FT_PROGRAM_DATA structure must be big enough to accommodate their respective strings (including null terminators). The sizes shown in the following example are more than adequate and can be rounded down if necessary. The restriction is that the Manufacturer string length plus the Description string length is less than or equal to 40 characters.
Note that the DLL must be informed which version of the FT_PROGRAM_DATA structure is being used. This is done through the Signature1, Signature2 and Version elements of the structure. Signature1 should always be 0x00000000, Signature2 should always be 0xFFFFFFFF and Version can be set to use whichever version is required. For compatibility with all current devices Version should be set to the latest version of the FT_PROGRAM_DATA structure which is defined in FTD2XX.h.
The string parameters in the FT_PROGRAM_DATA structure should be passed as DWORDs to avoid overlapping of parameters. All string pointers are passed out separately from the FT_PROGRAM_DATA structure.