EscapeCommFunction (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function directs a specified communication device to perform an extended function.

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.

The following table shows possible values for this parameter.

ValueDescription
SETIRSets the serial port to infrared (IR) mode.

This value is specific to Windows CE.

CLRIRSets port to normal serial mode.

This value is specific to Windows CE.

CLRDTRClears the DTR (Data Terminal Ready) signal.
CLRRTSClears the RTS (Request To Send) signal.
SETDTRSends the DTR (Data Terminal Ready) signal.
SETRTSSends the RTS (Request To Send) signal.
SETXOFFCauses transmission to act as if an XOFF character has been received.
SETXONCauses transmission to act as if an XON character has been received.
SETBREAKSuspends 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.

CLRBREAKRestores 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 obtain extended error data, call the GetLastError function.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Winbase.h.
Link Library: Serdev.lib.

See Also

ClearCommBreak | CreateFile | SetCommBreak


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show: