SPORT_GET_HANDLE

Run-Time Function: Returns the Win32 handle associated with the communications port. This is the handle that was returned by the CreateFile Win32 API.

Module: USE DFLIB

Syntax

iresult = SPORT_GET_HANDLE (port, handle)

port
(Input) Integer. The port number.


handle
(Output) INTEGER(4). The Win32 handle that was returned from CreatFile( ) on the serial port. This handle can be used with other Win32 functions to set non-standard parameters for the communications port.

Results:

The result is of type INTEGER(4). The result is zero if successful; otherwise, a Win32 error value.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: Using the Serial I/O Port Routines, and Communications, and Communications Functions in the Win32 SDK

Example

USE DFLIB
INTEGER(4) iresult
INTEGER(4) handle
iresult =  SPORT_GET_HANDLE( 2, handle )
END