Share via


IOCTL_SERIAL_PURGE (Windows CE 5.0)

Send Feedback

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

OS Versions: Windows CE 1.0 and later.
Header: Pegdser.h.

See Also

COM_IOControl | COM_Open | DeviceIoControl

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.