FltCbdqRemoveNextIo - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// fltkernel.h

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

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-fltkernel-fltcbdqremovenextio)

FltCbdqRemoveNextIo function

Description

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

Parameters

Cbdq [in, out]

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

PeekContext [in, optional]

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.

See also

FLT_CALLBACK_DATA

FLT_CALLBACK_DATA_QUEUE

FLT_IS_IRP_OPERATION

FltCbdqDisable

FltCbdqEnable

FltCbdqInitialize

FltCbdqInsertIo

FltCbdqRemoveIo