Expand Minimize

FsRtlInsertPerStreamContext routine

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

StreamContext [in]

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 codeDescription
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

Version

This routine is available on Update Rollup for Windows 2000 Service Pack 4 (SP4) and on Windows XP and later.

Header

Ntifs.h (include Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL

See also

FSRTL_ADVANCED_FCB_HEADER
FSRTL_PER_STREAM_CONTEXT
FsRtlGetPerStreamContextPointer
FsRtlInitPerStreamContext
FsRtlLookupPerStreamContext
FsRtlRemovePerStreamContext
FsRtlSetupAdvancedHeader
FsRtlSupportsPerStreamContexts
FsRtlTeardownPerStreamContexts

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft