The FltGetSectionContext routine retrieves a section context that was created for a file stream by a specified minifilter driver instance.
NTSTATUS FLTAPI FltGetSectionContext( PFLT_INSTANCE Instance, PFILE_OBJECT FileObject, PFLT_CONTEXT *Context );
An opaque instance pointer for the minifilter driver instance whose context is to be retrieved.
A pointer to a file object for the stream.
A pointer to a caller-allocated variable that receives the address of the context.
FltGetSectionContext returns STATUS_SUCCESS or an appropriate NTSTATUS value, such as one of the following.
||No matching context was found. This is an error code.|
||The volume attached to this instance does not support section contexts. This is an error code.|
FltGetSectionContext retrieves a section context that was created for a file stream by a specified minifilter driver instance. A section context is created by calling FltCreateSectionForDataScan.
FltGetSectionContext 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 FltGetSectionContext must be matched by a subsequent call to FltReleaseContext.
To allocate a new context, call FltAllocateContext.
Minifilters must not explicitly delete a section context passed to FltCreateSectionForDataScan. A section context is deallocated and removed from a stream by calling FltCloseSectionForDataScan in this case.
|Windows version||The FltGetSectionContext routine is available starting with Windows 8.|
|Header||fltkernel.h (include Fltkernel.h)|