Export (0) Print
Expand All
Expand Minimize

FltGetContextsEx routine

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

Syntax


VOID FltGetContextsEx(
  _In_   PCFLT_RELATED_OBJECTS FltObjects,
  _In_   FLT_CONTEXT_TYPE DesiredContexts,
  _In_   SIZE_T ContextsSize,
  _Out_  PFLT_RELATED_CONTEXTS_EX Contexts
);

Parameters

FltObjects [in]

Pointer to an 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]

Type of contexts to retrieve. This parameter can have one or more of the following values:

FLT_ALL_CONTEXTS

FLT_FILE_CONTEXT (Windows Vista and later only.)

FLT_INSTANCE_CONTEXT

FLT_STREAM_CONTEXT

FLT_STREAMHANDLE_CONTEXT

FLT_TRANSACTION_CONTEXT (Windows Vista and later only.)

FLT_VOLUME_CONTEXT

FLT_SECTION_CONTEXT (Windows 8 and later only.)

ContextsSize [in]

The size, in bytes, of the FLT_RELATED_CONTEXTS_EX structure pointed to by Contexts. Set to sizeof(FLT_RELATED_CONTEXTS_EX).

Contexts [out]

Pointer to a caller-allocated FLT_RELATED_CONTEXTS_EX structure that receives the requested contexts. Contexts that are not requested, or requested but not found, are set to zero.

Return value

None

Remarks

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

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

PFLT_PRE_OPERATION_CALLBACK

PFLT_POST_OPERATION_CALLBACK

PFLT_INSTANCE_SETUP_CALLBACK

PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK

PFLT_INSTANCE_TEARDOWN_CALLBACK

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

  • Call FltReleaseContextsEx for the entire structure that the Contexts parameter points to.

  • Call FltReleaseContext for each of the contexts returned in the structure and set each context field returned in the structure to zero.

Requirements

Version

Available starting with Windows 8.

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FLT_RELATED_CONTEXTS_EX
FLT_RELATED_OBJECTS
FltRegisterFilter
FltReleaseContext
FltReleaseContextsEx
PFLT_INSTANCE_QUERY_TEARDOWN_CALLBACK
PFLT_INSTANCE_SETUP_CALLBACK
PFLT_INSTANCE_TEARDOWN_CALLBACK
PFLT_POST_OPERATION_CALLBACK
PFLT_PRE_OPERATION_CALLBACK

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft