Share via


IOCTL_SERIAL_PURGE (Windows Embedded CE 6.0)

1/6/2010

This IOCTL discards characters from the output or input buffer of a specified communications resource. It can also terminate pending read or write operations on the resource. The DeviceIoControl function executes this IOCTL.

Parameters

  • dwOpenData
    [in] Handle returned from a call to the COM_Open function.
  • dwCode
    [in] Set to this IOCTL: IOCTL_SERIAL_PURGE.
  • pBufIn
    [in] Pointer to a DWORD variable containing the action.

    The following table shows the flags that this DWORD variable can contain.

    Flag Description

    PURGE_TXABORT

    Terminates all outstanding write operations and returns immediately, even if the write operations have not been completed.

    PURGE_RXABORT

    Terminates all outstanding read operations and returns immediately, even if the read operations have not been completed.

    PURGE_TXCLEAR

    Clears the output buffer, if the driver has one.

    PURGE_RXCLEAR

    Clears the input buffer, if the driver has one.

  • dwLenIn
    [in] Set to sizeof(DWORD).
  • pBufOut
    Ignored.
  • dwLenOut
    Ignored.
  • pdwActualOut
    Ignored.

Return Values

Returns TRUE if successful. Returns FALSE otherwise. To get extended error information, call GetLastError.

Requirements

Header pegdser.h
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Serial Port Driver IOCTLs
COM_IOControl
COM_Open
DeviceIoControl