Your browser does not allow scripts
Please click here to view a static table of contents without scripts
FT_EE_UARead
Return to Introduction  Previous page  Next page
Read the contents of the EEUA.

FT_STATUS
FT_EE_UARead
(FT_HANDLE ftHandle, PUCHAR pucData, DWORD dwDataLen, LPDWORD lpdwBytesRead)




Parameters
ftHandle
Handle of the device.
pucData
Pointer to a buffer that contains storage for data to be read.
dwDataLen
Size, in bytes, of buffer that contains storage for the data to be read.
lpdwBytesRead
Pointer to a DWORD that receives the number of bytes read..




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



Remarks
This function interprets the parameter pucData as a pointer to an array of bytes of size dwDataLen that contains storage for the data to be read from the EEUA. The actual number of bytes read is stored in the DWORD referenced by lpdwBytesRead.

If
dwDataLen is less than the size of the EEUA, then dwDataLen bytes are read into the buffer. Otherwise, the whole of the EEUA is read into the buffer.

An application should check the function return value and
lpdwBytesRead when FT_EE_UARead returns.



Example

FT_HANDLE ftHandle;
FT_STATUS ftStatus = FT_Open(0, &ftHandle);

if (ftStatus != FT_OK) {
    // FT_Open FAILED!
}

unsigned char Buffer[64];
DWORD BytesRead;

ftStatus = FT_EE_UARead(ftHandle, Buffer, 64, &BytesRead);
if (ftStatus == FT_OK) {
    // FT_EE_UARead OK
    // User Area data stored in Buffer
    // Number of bytes read from EEUA stored in BytesRead
}
else {
    // FT_EE_UARead FAILED!
}