FltCloseSectionForDataScan function

The FltCloseSectionForDataScan routine closes a section object associated with a file stream.

Syntax

NTSTATUS FLTAPI FltCloseSectionForDataScan(
  PFLT_CONTEXT SectionContext
);

Parameters

SectionContext

A pointer to the section context to close.

Return Value

FltCloseSectionForDataScan returns STATUS_SUCCESS or an appropriate NTSTATUS value, such as one of the following.

Return code Description
STATUS_INVALID_PARAMETER
The section context was not properly created. An allocated section context must first be passed to FltCreateSectionForDataScan. This is an error code.
STATUS_NOT_FOUND
The section context is already closed.

Remarks

Minifilters use the FltCloseSectionForDataScan routine to deallocate and remove a section context from a file object. All previously allocated section contexts passed to FltCreateSectionForDataScan must be passed to FltCloseSectionForDataScan. Otherwise, minifilters can call FltReleaseContext if the section context was allocated with FltAllocateContext but no section was created with FltCreateSectionForDataScan.

After FltCloseSectionForDataScan returns, operations that conflict with the section described by SectionContext will not be synchronized by the filter manager.

Requirements

   
Windows version The FltCloseSectionForDataScan routine is available starting with Windows 8.
Target Platform Universal
Header fltkernel.h (include Fltkernel.h)
Library FltMgr.lib
IRQL "<= APC_LEVEL"

See Also

FltAllocateContext

FltCreateSectionForDataScan

FltDeleteContext