COM_Open (Windows Embedded CE 6.0)
1/6/2010
This function initializes the serial port driver.
Syntax
HANDLE COM_Open(
HANDLE pContext,
DWORD AccessCode,
DWORD ShareMode
);
Parameters
- pContext
[in] Pointer to a handle returned by the COM_Init function.
- AccessCode
[in] Access level requested by the caller, such as shared read or read/write.
- ShareMode
[in] Sharing mode passed to the CreateFile function.
Return Value
Returns a handle representing the serial port.
Remarks
This function opens a serial device. The HANDLE returned must be used in all subsequent calls to the serial driver. This function starts the thread that handles the serial events. It is exposed to applications through CreateFile. This function should be thread-safe. The serial port upper layer implementations supplied by Microsoft are all thread-safe.
Requirements
Header | Developer Implemented |
Library | Serial.lib |
Windows Embedded CE | Windows CE 1.0 and later |
See Also
Reference
Serial Port Driver MDD Functions
COM_Close
COM_Init