FltGetVolumeContext - NtDoc

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

NTSTATUS FLTAPI FltGetVolumeContext(
  [in]  PFLT_FILTER  Filter,
  [in]  PFLT_VOLUME  Volume,
  [out] PFLT_CONTEXT *Context
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

FltGetVolumeContext function

Description

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

Parameters

Filter [in]

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

Volume [in]

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

Context [out]

Pointer to a caller-allocated variable that receives the address of the requested context. This parameter is required and can't be set to NULL.

Return value

FltGetVolumeContext returns STATUS_SUCCESS when it successfully returns the requested context. Otherwise, it returns an appropriate NTSTATUS value such as the following:

Return code Description
STATUS_NOT_FOUND No matching context was found on this file at this time, so FltMgr set Context to NULL_CONTEXT. This is an error code.

Remarks

For more information about contexts, see About minifilter contexts.

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.

See also

FltAllocateContext

FltDeleteContext

FltDeleteVolumeContext

FltReleaseContext

FltSetVolumeContext