ComGetHandle Procedure

Returns the WIN32 handle to the opened COM port.

Syntax

[ handle = ] ComGetHandle ( lPort )

The ComGetHandle procedure syntax has the following parts:

 

Name

Type

Description

handle

AHandle

The Win32 handle.

lPort

Val Long

Serial port number (1 for COM1, etc.)

Comments

The lPort must be open, or else the function returns -1.

The returned handle can be used with any Win32 API that can accept a COM port handle.

Example

handle = ComGetHandle(1)

See Also

ComClose, ComOpen, ComSetup