FltCbdqRemoveNextIo function (fltkernel.h)

FltCbdqRemoveNextIo removes the next matching item in a minifilter driver's callback data queue.

Syntax

PFLT_CALLBACK_DATA FLTAPI FltCbdqRemoveNextIo(
  [in, out]      PFLT_CALLBACK_DATA_QUEUE Cbdq,
  [in, optional] PVOID                    PeekContext
);

Parameters

[in, out] Cbdq

Pointer to a cancel-safe callback data queue. This queue must have been initialized by calling FltCbdqInitialize.

[in, optional] PeekContext

Pointer to caller-defined information that identifies the matching item. This parameter is optional and can be NULL.

Return value

FltCbdqRemoveNextIo returns a pointer to the callback data (FLT_CALLBACK_DATA) structure for the item that was removed from the queue or NULL if no matching items were found. FltCbdqRemoveNextIo only returns items for I/O operations that have not yet been canceled.

Remarks

FltCbdqRemoveNextIo removes the next matching item from a minifilter driver's callback data queue.

Minifilter drivers can use the FltCbdqXxx routines to implement a callback data queue for IRP-based I/O operations. By using these routines, minifilter drivers can make their queues cancel-safe; the system transparently handles I/O cancellation for the minifilter drivers.

The FltCbdqXxx routines can only be used for IRP-based I/O operations. To determine whether a given callback data (FLT_CALLBACK_DATA) structure represents an IRP-based I/O operation, use the FLT_IS_IRP_OPERATION macro.

A callback data queue is initialized by FltCbdqInitialize. FltCbdqRemoveNextIo uses the routines provided in the queue's dispatch table to lock the queue and remove the next matching item from the queue. The remove operation itself is performed by the minifilter driver's CbdqRemoveIo callback routine.

FltCbdqRemoveNextIo uses the queue's CbdqPeekNextIo callback routine to scan the queue for matching items. The PeekContext parameter is passed to the CbdqPeekNextIo callback routine to loop through matching items. The meaning of PeekContext and the criteria for an item to match a given PeekContext are entirely dependent on the minifilter driver.

If the queue is protected by a spin lock, rather than a mutex object or resource variable, the caller of FltCbdqRemoveNextIo can be running at IRQL <= DISPATCH_LEVEL. If a mutex or resource is used, the caller must be running at IRQL <= APC_LEVEL.

Requirements

Requirement Value
Target Platform Universal
Header fltkernel.h (include Fltkernel.h)
IRQL See Remarks section.

See also

FLT_CALLBACK_DATA

FLT_CALLBACK_DATA_QUEUE

FLT_IS_IRP_OPERATION

FltCbdqDisable

FltCbdqEnable

FltCbdqInitialize

FltCbdqInsertIo

FltCbdqRemoveIo