FltCbdqRemoveIo callback function

FltCbdqRemoveIo removes a particular item from a minifilter driver's callback data queue.

Syntax


PFLT_CALLBACK_DATA FltCbdqRemoveIo(
  _Inout_ PFLT_CALLBACK_DATA_QUEUE            Cbdq,
  _In_    PFLT_CALLBACK_DATA_QUEUE_IO_CONTEXT Context
);

Parameters

Cbdq [in, out]

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

Context [in]

Context pointer for the item to be removed. This context is initialized by FltCbdqInsertIo when the I/O request is first inserted in the queue. This parameter is required and must be non-NULL.

Return value

FltCbdqRemoveIo returns a pointer to the callback data structure for the I/O request that was removed from the queue. If no matching I/O request is found or if the queue is empty, FltCbdqRemoveIo returns NULL.

Remarks

FltCbdqRemoveIo removes the callback data (FLT_CALLBACK_DATA) structure for a particular I/O operation from a minifilter driver's callback data queue. FltCbdqRemoveIo can only be used to delete a callback data structure that has a Context structure associated with it. This association is created when the callback data structure is inserted into the callback data queue by FltCbdqInsertIo.

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 structure represents an IRP-based I/O operation, use the FLT_IS_IRP_OPERATION macro.

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

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

Requirements

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
FltCbdqRemoveNextIo

 

 

Send comments about this topic to Microsoft

Show: