IOCTL_SERIAL_PURGE (Windows CE 5.0)
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.
[in] Handle returned from a call to the COM_Open function.
[in] Set to this IOCTL: IOCTL_SERIAL_PURGE.
[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.
[in] Set to sizeof(DWORD).
Returns TRUE if successful. Returns FALSE otherwise. To get extended error information, call GetLastError.
OS Versions: Windows CE 1.0 and later.
Send Feedback on this topic to the authors