Returns the WIN32 handle to the opened COM port.
[ 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.) |
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.
handle = ComGetHandle(1)