EscapeCommFunction

  BOOL EscapeCommFunction(hCommDev, fdwFunc)    
  HANDLE hCommDev; /* identifies the comm device */
  DWORD fdwFunc; /* specifies the extended function */

The EscapeCommFunction directs the specified communications device to carry out an extended function.

Parameters

hCommDev

Identifies the communication device to carry out the extended function. The CreateFile function returns this value.

fdwFunc

Specifies the function code of the extended function. This parameter can be one of the following values:

Function Meaning

CLRDTR Clears the data-terminal-ready (DTR) signal.
CLRRTS Clears the request-to-send (RTS) signal.
SETDTR Sends the data-terminal-ready (DTR) signal.
SETRTS Sends the request-to-send (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.
SETBREAK Suspends character transmission and places the transmission line in a break state until a CLRBREAK or ClearCommBreak function is called. This function is identical to SetCommBreak. Note that no flush of data is implied by this function.
CLRBREAK Restores character transmission and places the transmission line in a nonbreak state. This is identical to ClearCommBreak.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

See Also

SetCommBreak, ClearCommBreak