FsRtlInsertPerStreamContext - NtDoc

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

NTSTATUS FsRtlInsertPerStreamContext(
       PFSRTL_ADVANCED_FCB_HEADER PerStreamContext,
  [in] PFSRTL_PER_STREAM_CONTEXT  Ptr
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-fsrtlinsertperstreamcontext)

FsRtlInsertPerStreamContext function

Description

The FsRtlInsertPerStreamContext routine associates a file system filter driver's per-stream context structure with a file stream.

Parameters

PerStreamContext

Pointer to the FSRTL_ADVANCED_FCB_HEADER structure for the file stream. To get this pointer from a file object, use the FsRtlGetPerStreamContextPointer macro.

Ptr [in]

Pointer to a FSRTL_PER_STREAM_CONTEXT structure that the filter driver has allocated and initialized. To initialize this structure, use the FsRtlInitPerStreamContext macro.

Return value

FsRtlInsertPerStreamContext returns one of the following NTSTATUS values:

Return code Description
STATUS_SUCCESS The call to FsRtlInsertPerStreamContext was successful.
STATUS_INVALID_DEVICE_REQUEST The underlying file system does not support filter contexts.

Remarks

A file system filter driver calls FsRtlInsertPerStreamContext to associate its own per-stream context structure with a file stream. The per-stream context structure contains context information that the filter driver maintains for the file stream.

After the per-stream context structure has been associated with a file stream, it can be retrieved by calling FsRtlLookupPerStreamContext or removed by calling FsRtlRemovePerStreamContext.

For more information, see Tracking Per-Stream Context in a Legacy File System Filter Driver.

See also

FSRTL_ADVANCED_FCB_HEADER

FSRTL_PER_STREAM_CONTEXT

FsRtlGetPerStreamContextPointer

FsRtlInitPerStreamContext

FsRtlLookupPerStreamContext

FsRtlRemovePerStreamContext

FsRtlSetupAdvancedHeader

FsRtlSupportsPerStreamContexts

FsRtlTeardownPerStreamContexts