The IoCsqRemoveIrp routine removes a particular IRP from the queue.
PIRP IoCsqRemoveIrp( PIO_CSQ Csq, PIO_CSQ_IRP_CONTEXT Context );
Pointer to the IO_CSQ_IRP_CONTEXT structure that identifies the IRP to remove. The IO_CSQ_IRP_CONTEXT structure is initialized by IoCsqInsertIrp or IoCsqInsertIrpEx when the IRP is first inserted in the queue.
This routine returns a pointer to the IRP that was removed from the queue, or NULL if that IRP has been canceled.
IoCsqRemoveIrp uses the queue's dispatch routines to remove the IRP. The IoCsqRemoveIrp routine:
- Calls the queue's CsqAcquireLock routine to lock the queue.
- Uses the IrpContext parameter to determine which IRP to remove, and calls the queue's CsqRemoveIrp routine to remove that IRP.
- Calls the queue's CsqReleaseLock routine to unlock the queue.
Note that IoCsqXxx routines use the DriverContext member of the IRP to hold IRP context information. Drivers that use these routines to queue IRPs must leave that member unused.
Callers of IoCsqRemoveIrp must be running at an IRQL <= DISPATCH_LEVEL. The driver's callback routines must work correctly at that IRQL.
|Minimum supported client||Available in Windows XP and later versions of Windows. Drivers that must also work in Windows 2000 and Windows 98/Me can instead link to Csq.lib to use the routine.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|IRQL||"<= DISPATCH_LEVEL (see Remarks section)"|
Send feedback about: