COM_Open

This function initializes the serial port driver.

Syntax

HANDLE COM_Open( HANDLE pContext, DWORD AccessCode,
DWORD
ShareMode );

Parameters

pContext
Pointer to a handle returned by the COM_Init function.
AccessCode
Specifies the access level requested by the caller, such as shared read or read/write.
ShareMode
Specifies the sharing mode that the calling application passed to the CreateFile function.

Return Values

Returns a handle representing the serial port.

Remarks

The user calls this function to open the serial device. The HANDLE returned must be used by the application in all subsequent calls to the serial driver. This function starts the thread that handles the serial events. This function is exported to applications through CreateFile, and it is defined in the Mdd.c file.

See Also

COM_Close