INtime SDK Help
EscapeCommFunction (Serial Communications)
INtime SDK v7 > About INtime > Networking and I/O > Serial Communications (COMM) > EscapeCommFunction (Serial Communications)

Directs a specified communications device to perform an extended function.

BOOLEAN EscapeCommFunction(
  COMMHANDLE hComm,  // handle to communications device
  DWORD dwFunc       // extended function to perform
);

Parameters

hComm
[in] Handle to the communications device. OpenComm returns this handle.
dwFunc
[in] Specifies the code of the extended function to perform. This parameter can be one of the following values:
Value Description
CLRDTR Clears the DTR (data-terminal-ready) signal.
CLRRTS Clears the RTS (request-to-send) signal.
SETDTR Sends the DTR (data-terminal-ready) signal.
SETRTS Sends the RTS (request-to-send) signal.
SETXOFF Causes transmission to act as if an XOFF character has been received.
SETXON Causes transmission to act as if an XON character has been received.
SETBREAK Suspends character transmission and places the transmission line in a break state until ClearCommBreak is called (or EscapeCommFunction is called with the CLRBREAK extended function code). The SETBREAK extended function code is identical to SetCommBreak. Note that this extended function does not flush data that is not yet transmitted.
CLRBREAK Restores character transmission and places the transmission line in a nonbreak state. The CLRBREAK extended function code is identical to the ClearCommBreak function.

Return Values

Non-zero
Success.
0 (zero)
Failure. To determine the status, call GetLastRtError.

Status

E_CONTEXT
Attempt to change flow control line when flow control enabled.
E_DISCONNECTED
COMM channel is closed
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