FltGetContexts - NtDoc

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

VOID FLTAPI FltGetContexts(
  PCFLT_RELATED_OBJECTS FltObjects,
  FLT_CONTEXT_TYPE      DesiredContexts,
  PFLT_RELATED_CONTEXTS Contexts
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

FltGetContexts function

Description

The FltGetContexts routine retrieves a minifilter driver's contexts for the objects related to the current operation.

Parameters

FltObjects

[in] Pointer to a FLT_RELATED_OBJECTS structure containing opaque pointers for the objects related to the current operation. For more information about this parameter, see the Remarks section.

DesiredContexts

[in] Identifies the types of contexts to retrieve. This parameter can be a bitwise OR of the following values.

Constant Value
FLT_VOLUME_CONTEXT 0x0001
FLT_INSTANCE_CONTEXT 0x0002
FLT_FILE_CONTEXT 0x0004
FLT_STREAM_CONTEXT 0x0008
FLT_STREAMHANDLE_CONTEXT 0x0010
FLT_TRANSACTION_CONTEXT 0x0020
FLT_SECTION_CONTEXT (starting in Windows 8) 020040
FLT_ALL_CONTEXTS Bitwise OR of all of the context values

Contexts

[out] Pointer to a caller-allocated FLT_RELATED_CONTEXTS structure that receives the requested contexts. This parameter is required and cannot be set to NULL. FltMgr sets a structure member to zero for:

Return value

None.

Remarks

For more information about contexts, see About minifilter contexts.

A minifilter driver calls FltGetContexts to retrieve pointers to the minifilter driver's contexts for the objects in a FLT_RELATED_OBJECTS structure.

The following minifilter driver callback routine types receive a pointer to a FLT_RELATED_OBJECTS structure as the FltObjects input parameter:

FltGetContexts increments the reference count on each of the contexts returned in the FLT_RELATED_CONTEXTS structure that the Contexts parameter points to. Thus for every successful call to FltGetContexts, the caller must either:

See also

FLT_RELATED_CONTEXTS

FLT_RELATED_OBJECTS

FltGetContextsEx

FltRegisterFilter

FltReleaseContext

FltReleaseContexts

PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK

PFLT_INSTANCE_SETUP_CALLBACK

PFLT_INSTANCE_TEARDOWN_CALLBACK

PFLT_POST_OPERATION_CALLBACK

PFLT_PRE_OPERATION_CALLBACK