Compartir a través de


EscapeCommFunction (Windows CE 5.0)

Send Feedback

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

BOOLEscapeCommFunction(HANDLEhFile, DWORDdwFunc);

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.

    Value Description
    SETIR Sets the serial port to infrared (IR) mode.

    This value is specific to Windows CE.

    CLRIR Sets port to normal serial mode.

    This value is specific to Windows CE.

    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 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.