FTC_STATUS
|
I2C_GetDeviceNameLocID
|
(DWORD dwDeviceNameIndex, LPSTR lpDeviceNameBuffer, DWORD dwBufferSize, LPDWORD lpdwLocationID)
|
Parameters
dwDeviceNameIndex
|
Index of the FT2232C device.
|
lpDeviceNameBuffer
|
Pointer to buffer that receives the device name of the specified FT2232C device connected to a system. The string will be NULL terminated.
|
dwBufferSize
|
Length of the buffer created for the device name string. Set buffer length to a minimum of 50 characters.
|
lpdwLocationID
|
Pointer to a variable of type DWORD which receives the location identifier of the specified FT2232C device.
|
Return Value
FTC_SUCCESS if successful, otherwise the return value is one of the following FTC error codes:
FTC_DEVICE_NOT_FOUND
FTC_INVALID_DEVICE_NAME_INDEX
FTC_NULL_ DEVICE_NAME_BUFFER_POINTER
FTC_ DEVICE_NAME_BUFFER_TOO_SMALL
FTC_IO_ERROR
Remarks
The I2C_GetNumDevices function can be used to obtain the number of available FT2232C devices connected to a system. The device index is 0 based. The information returned from this function can be used with I2C_OpenEx to open a specific device.
Please note that Windows CE does not support location IDs. In the Windows CE FTCI2C DLL, devices can be identified by serial number using the lpDeviceNameBuffer. lpdwLocationID is undefined in this case.
Example
FTC_STATUS Status = FTC_SUCCESS;
char szDeviceName[100];
DWORD dwLocationID = 0;
Status = I2C_GetDeviceNameLocID(0, szDeviceName, 100, &dwLocationID);