Partager via


EscapeCommFunction (Windows Embedded CE 6.0)

1/6/2010

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

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. The following table shows possible values.

    Value Description

    CLRBREAK

    Restores character transmission and places the transmission line in a nonbreak state.

    The CLRBREAK extended function code is identical to the ClearCommBreak function.

    CLRDTR

    Clears the data-terminal-ready (DTR) signal.

    CLRIR

    Sets port to normal serial mode. This value is specific to Windows Embedded CE.

    CLRRTS

    Clears the request-to-send (RTS) signal.

    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.

    SETDTR

    Sends the DTR signal.

    SETIR

    Sets the serial port to infrared (IR) mode. This value is specific to Windows Embedded CE.

    SETRTS

    Sends the RTS 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.

Return Value

Nonzero indicates success. Zero indicates failure. To obtain extended error data, call the GetLastError function.

Requirements

Header winbase.h
Library Serdev.lib
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

Serial Communications Functions
ClearCommBreak
SetCommBreak

Other Resources

CreateFile