GetPhysical Method

Retrieves the name of physical serial port by index.

Syntax

Visual Basic .NET
Function GetPhysical(ByVal Index As UInt32) As String 
Visual C#
String GetPhysical(UInt32 Index);

Parameters

Index

[in] Index of physical serial port (0 ... unPortsCount - 1). Refer to EnumPhysical.

Return

Returns the number of physical serial port by index.

Errors

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).

Remarks

You must call EnumPhysical before calling this function.

See Also

EnumPhysical