EscapeCommFunction function (winbase.h)
Directs the specified communications device to perform an extended function.
Syntax
BOOL EscapeCommFunction(
[in] HANDLE hFile,
[in] DWORD dwFunc
);
Parameters
[in] hFile
A handle to the communications device. The CreateFile function returns this handle.
[in] dwFunc
The extended function to be performed. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
Restores character transmission and places the transmission line in a nonbreak state. The CLRBREAK extended function code is identical to the ClearCommBreak function. |
|
Clears the DTR (data-terminal-ready) signal. |
|
Clears the RTS (request-to-send) signal. |
|
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. Note that this extended function does not flush data that has not been transmitted. |
|
Sends the DTR (data-terminal-ready) signal. |
|
Sends the RTS (request-to-send) signal. |
|
Causes transmission to act as if an XOFF character has been received. |
|
Causes transmission to act as if an XON character has been received. |
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2003 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | winbase.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |