// wdm.h
PIRP IoCsqRemoveNextIrp(
[in, out] PIO_CSQ Csq,
[in, optional] PVOID PeekContext
);
View the official Windows Driver Kit DDI referenceNo description available.
The IoCsqRemoveNextIrp routine removes the next matching IRP in the queue.
Csq [in, out]Pointer to the driver's dispatch table for cancel-safe IRP queues. The dispatch table must be initialized by IoCsqInitialize.
PeekContext [in, optional]A pointer to a driver-defined context value. IoCsqRemoveNextIrp passes this parameter to the driver's CsqPeekNextIrp routine. For more information, see the following Remarks section.
This routine returns a pointer to the next matching IRP in the queue, or NULL if no more IRPs are available. The routine only returns IRPs that have not yet been canceled.
IoCsqRemoveNextIrp uses the queue's dispatch routines to remove the IRP. The IoCsqRemoveNextIrp routine:
For more information, see Cancel-Safe IRP Queues.
Note that IoCsq*Xxx* routines use the DriverContext[3] member of the IRP to hold IRP context information. Drivers that use these routines to queue IRPs must leave that member unused.
Callers of IoCsqRemoveNextIrp must be running at an IRQL <= DISPATCH_LEVEL. The driver's callback routines must work correctly at that IRQL.