PortHandle Property
Returns a Win32 (long integer) handle to the communications port.
Syntax
Visual Basic
object.PortHandle [ = value ]
Visual C++
object.GetPortHandle()
Delphi
object.PortHandle [ := value ]
| Part
| Description |
| object |
An object expression that evaluates to a PortController object. |
Example
Visual Basic
Dim handle As Long
handle = myPortController.PortHandle
Visual C++
HANDLE hTmp = (void *)m_myPortController.GetPortHandle();
Delphi
var handle: Integer; // declare variable in the proper place
handle = myPortController.PortHandle;
Remarks
Returns
A Win32 long integer handle to the communications port.
Errors
Reading the PortHandle property while the port is closed is not permitted
and will cause the PortController to throw a "Port is closed" exception.
See Also
PortName
|