This function directs a specified communication device to perform an extended function.
At a Glance
Header file: | Winbase.h |
Windows CE versions: | 1.0 and later |
Syntax
BOOL EscapeCommFunction(HANDLE hFile, DWORD dwFunc);
Parameters
hFile
[in] Handle to the communication device. The CreateFile function returns this handle.
dwFunc
[in] Specifies the extended function code to perform. It can be one of the following values:
Value | Description |
SETIR | Sets the serial port to infrared (IR) mode. |
CLRIR | Sets port to normal serial mode. |
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 the ClearCommBreak function is called (or EscapeCommFunction is called with the CLRBREAK extended function code). The SETBREAK extended function code is identical to the SetCommBreak function. This extended function does not flush data that has not been 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
Nonzero indicates success. Zero indicates failure. To get extended error data, call GetLastError.
See Also