Retrieves the name of physical serial port by index.
| Visual Basic | Function GetPhysical(Index As Long) As String
|
|---|---|
| Delphi | function GetPhysical(Index: Integer): String;
|
| Visual C++ (MFC) | CString GetPhysical(long Index);
|
| Visual C++ (#import) | _bstr_t GetPhysical(long Index);
|
Index
[in] Index of physical serial port (0 ... unPortsCount - 1). Refer to EnumPhysical.
Returns the number of physical serial port by index.
The method may throw exception. Use GetLastError method to get the error code.
| 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). |
You must call EnumPhysical before calling this function.