WdfIoQueuePurgeSynchronously function (wdfio.h)
[Applies to KMDF and UMDF]
The WdfIoQueuePurgeSynchronously method causes the framework to stop queuing I/O requests to an I/O queue and to cancel unprocessed requests and driver-owned cancellable requests.
void WdfIoQueuePurgeSynchronously( WDFQUEUE Queue );
[in] A handle to a framework queue object.
A bug check occurs if the driver supplies an invalid object handle.
After a driver calls WdfIoQueuePurgeSynchronously, the framework stops adding I/O requests to the specified queue. The framework cancels all requests that it has not delivered to the driver. If the framework receives additional requests for the queue, it completes them with a completion status value of STATUS_INVALID_DEVICE_STATE.
WdfIoQueuePurgeSynchronously returns after all the unprocessed and driver-owned requests are completed or canceled.
After a driver has purged an I/O queue, it can restart the queue by calling WdfIoQueueStart.
Do not call WdfIoQueuePurgeSynchronously from the following queue object event callback functions, regardless of the queue with which the event callback function is associated:
The following code example purges a specified I/O queue.
|Minimum KMDF version||1.0|
|Minimum UMDF version||2.0|
|Header||wdfio.h (include Wdf.h)|
|Library||Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)|
|DDI compliance rules||ChangeQueueState, DriverCreate, EvtSurpriseRemoveNoSuspendQueue, KmdfIrql, KmdfIrql2, NoCancelFromEvtSurpriseRemove|