Bewerken

Delen via


FsRtlInsertPerStreamContext function (ntifs.h)

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

Syntax

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

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.

[in] 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

Requirement Value
Minimum supported client Windows 2000 SP4 Update Rollup; Windows XP
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See also

FSRTL_ADVANCED_FCB_HEADER

FSRTL_PER_STREAM_CONTEXT

FsRtlGetPerStreamContextPointer

FsRtlInitPerStreamContext

FsRtlLookupPerStreamContext

FsRtlRemovePerStreamContext

FsRtlSetupAdvancedHeader

FsRtlSupportsPerStreamContexts

FsRtlTeardownPerStreamContexts