Share via


EscapeCommFunction (Compact 2013)

3/28/2014

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

    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.

    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

See Also

Reference

Serial Communications Functions
ClearCommBreak
SetCommBreak

Other Resources

CreateFile