Opens a handle to a communications device.
COMMHANDLE OpenComm(
LPCSTR lpCommName, // device name
DWORD dwFlags // action and attributes
);
Parameters
lpCommName
- [in] Pointer to a null-terminated string that names the device to be opened. Currently, those devices may be COM1 through COM255.
dwFlags
- [in] None defined.
Return Values
- A device handle
- Success.
INVALID_COMM_HANDLE
- Failure. To determine the status, call GetLastRtError.
Status
E_EXIST
- COMM channel does not exist.
E_PARAM
- Invalid parameter.
Requirements
Versions |
Defined in |
Include |
Link to |
INtime 3.1 |
intime/rt/include/comm.h |
comm.h |
comm.lib |
See Also