FTID_STATUS
|
FTID_GetDeviceSerialNumber
|
(DWORD dwDeviceIndex, LPSTR lpSerialBuffer, DWORD dwSerialBufferLength)
|
Parameters
dwDeviceIndex
|
Index of the FT232R or FT245R device.
|
lpSerialBuffer
|
Pointer to buffer that receives the serial number of the FT232R or FT245R device. The string will be NULL terminated.
|
dwSerialBufferLength
|
Length of the buffer created for the device serial number.
|
Return Value
FTID_SUCCESS if successful, otherwise the return value is one of the following FTID error codes:
FTID_DEVICE_NOT_FOUND
FTID_INVALID_DEVICE_NAME_INDEX
FTID_PASSED_NULL_POINTER
FTID_BUFFER_SIZE_TOO_SMALL
FTID_IO_ERROR
Remarks
The FTID_GetNumDevices function can be used to obtain the number of available FT232R and FT245R devices connected to a system. The device index is 0 based.
Example
FTID_STATUS Status = FTID_SUCCESS;
char SerialNumber[256];
Status = FTID_GetDeviceSerialNumber(0, SerialNumber, 256);