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


Output Parameters


I/O Status Block

The Information member is set to zero.

The Status member is set to one of the following status values:


The request completed successfully.


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.


The driver is in the process of removing the device.


Serial queued the request for later processing.


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.



Wdm.h (include Wdm.h or Ntddk.h)



Send comments about this topic to Microsoft