FsRtlInsertPerStreamContext function

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

Syntax

NTSTATUS FsRtlInsertPerStreamContext(
  _In_ PFSRTL_ADVANCED_FCB_HEADER StreamContext,
  _In_ PFSRTL_PER_STREAM_CONTEXT  Ptr
);

Parameters

PerStreamContext

TBD

Ptr

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.

Requirements

   
Windows version This routine is available on Update Rollup for Windows 2000 Service Pack 4 (SP4) and on Windows XP and later.
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL "<= APC_LEVEL"

See Also

FSRTL_ADVANCED_FCB_HEADER

FsRtlSupportsPerStreamContexts

FsRtlRemovePerStreamContext

FsRtlSupportsPerStreamContexts

FsRtlGetPerStreamContextPointer

FsRtlLookupPerStreamContext

FsRtlTeardownPerStreamContexts

FSRTL_PER_STREAM_CONTEXT

FsRtlSetupAdvancedHeader

Send comments about this topic to Microsoft