FtVspcGetPhysical Function
Retrieves the name of physical serial port by index.
BOOL FtVspcGetPhysical( UINT unIndex, LPTSTR lpPortName, size_t cbPortName );
Parameters
unIndex
[in] Index of physical serial port (0 ... unPortsCount - 1). Refer to FtVspcEnumPhysical.
lpPortName
[in] A pointer to the buffer where the name of physical serial port is returned.
cbPortName
[in] Size of lpPortName buffer (in bytes).
Return Value
If the function succeeds, the return value is TRUE. Otherwise, use FtVspcGetLastError to get the error code (FtVspc_ErrorCode).
Errors
ftvspcErrorFailed | 1 | The operation has not been completed. |
---|---|---|
ftvspcErrorInvalidParameter | 2 | Invalid parameter. |
ftvspcErrorInsufficientBuffer | 4 | Insufficient buffer size. |
ftvspcErrorNoMoreItems | 102 | There is no item (possible reason: index is too high). |
Remarks
You must call FtVspcEnumPhysical before calling this function.