IRP_MJ_FLUSH_BUFFERS (Serial)
The IRP_MJ_FLUSH_BUFFER request flushes the internal write buffer of a serial device.
When Sent
A client uses a flush request to determine when Serial has completed all write requests the client sent before the flush request.
Input Parameters
None.
Output Parameters
None.
I/O Status Block
The Information member is set to zero.
The Status member is set to one of the following status values:
STATUS_SUCCESS
The request completed successfully.STATUS_CANCELLED
A client canceled the request. Serial also cancels a request if a device error occurs and Serial is configured to cancel a request if there is a device error.STATUS_DELETE_PENDING
The driver is in the process of removing the device.STATUS_PENDING
Serial queued the request for later processing.
Operation
Serial queues and starts processing write and flush requests in the order in which the requests are received. Serial completes a flush request after it calls IoCompleteRequest for all write requests that it received before a flush request. However, completion of the flush request does not indicate that all the previously started write requests are completed by other drivers in the device stack. For example, a filter driver might still be processing a write request. A client must check that a write request is completed by all drivers in the device stack before the client attempts to free or reuse a write request's IRP.
Requirements
Header |
Wdm.h (include Wdm.h or Ntddk.h) |