Bewerken

Delen via


FsRtlTeardownPerFileContexts function (ntifs.h)

File systems call theFsRtlTeardownPerFileContexts routine to free FSRTL_PER_FILE_CONTEXT objects that are associated with a file control block (FCB) structure.

Syntax

void FsRtlTeardownPerFileContexts(
  [in] PVOID *PerFileContextPointer
);

Parameters

[in] PerFileContextPointer

A pointer to an opaque pointer that identifies the per file context structure. To retrieve this pointer from a file object, use the FsRtlGetPerFileContextPointer macro.

Return value

None

Remarks

This routine calls the FreeCallback routine specified in the FSRTL_PER_FILE_CONTEXT object. The FreeCallback routine has to deallocate the FSRTL_PER_FILE_CONTEXT structure and the associated context.

To avoid conflicts in synchronization, the FsRtlTeardownPerFileContexts routine releases the lock for the per file context objects before calling FreeCallback. This avoids blocking access to the to the per file context objects by the filter for its own list operations, such as removal with FsRtlRemovePerFileContext.

Requirements

Requirement Value
Minimum supported client Available starting withWindows Vista.
Target Platform Universal
Header ntifs.h (include FltKernel.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <=APC_LEVEL

See also

FSRTL_PER_FILE_CONTEXT

PFREE_FUNCTION

Tracking Per-File Context in a Legacy File System Filter Driver