FltGetVolumeContext function

Download EaseFilter Filter Driver SDK Setup File
Download EaseFilter Filter Driver SDK Zip File

The FltGetVolumeContext routine retrieves a context that was set for a volume by a given minifilter driver.

Syntax

NTSTATUS FLTAPI FltGetVolumeContext(
  PFLT_FILTER  Filter,
  PFLT_VOLUME  Volume,
  PFLT_CONTEXT *Context
);

Parameters

Filter

Opaque filter pointer for the caller. This parameter is required and cannot be NULL.

Volume

Opaque pointer for the volume whose context is being retrieved. This parameter is required and cannot be NULL.

Context

Pointer to a caller-allocated variable that receives the address of the requested context.

Return value

FltGetVolumeContext returns STATUS_SUCCESS or an appropriate NTSTATUS value, such as the following:

Return code Description
STATUS_NOT_FOUND
No matching context was found. This is an error code.

Remarks

FltGetVolumeContext increments the reference count on the context that the Context parameter points to. When this context pointer is no longer needed, the caller must decrement its reference count by calling FltReleaseContext. Thus every successful call to FltGetVolumeContext must be matched by a subsequent call to FltReleaseContext.

To set a context for a volume, call FltSetVolumeContext.

To allocate a new context, call FltAllocateContext.

To delete a volume context, call FltDeleteVolumeContext or FltDeleteContext.

Requirements

   
Target Platform Universal
Header fltkernel.h (include Fltkernel.h)
Library FltMgr.lib
DLL Fltmgr.sys
IRQL <= APC_LEVEL