FsRtlLookupPerStreamContext - NtDoc

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

void FsRtlLookupPerStreamContext(
  _sc,
  _oid,
  _iid
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

FsRtlLookupPerStreamContext macro

Description

The FsRtlLookupPerStreamContext macro retrieves a per-stream context structure for a file stream.

Parameters

_sc

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

_oid

Pointer to a caller-allocated variable that uniquely identifies the owner of the per-stream context structure. The format of this variable is filter driver − specific. Must be non-NULL if a non-NULL value is supplied for InstanceId.

_iid

Pointer to a filter driver − allocated variable that can be used to distinguish among per-stream context structures created by the same filter driver. The format of this variable is filter driver − specific.

If OwnerId and InstanceId are both NULL, FsRtlLookupPerStreamContext returns the first per-stream context found.

If a non-NULL value is supplied for OwnerId and InstanceId is NULL, FsRtlLookupPerStreamContext returns the first per-stream context found whose OwnerId member matches the OwnerId parameter.

Remarks

A file system filter driver calls FsRtlLookupPerStreamContext to retrieve its per-stream context structure for a file stream. The per-stream context structure contains context information that the filter driver maintains for the file stream.

Note FsRtlLookupPerStreamContext can only be used on file systems that support per-stream contexts.

To initialize a per-stream context structure, use the FsRtlInitPerStreamContext macro.

To associate an initialized per-stream context structure with a file stream, call FsRtlInsertPerStreamContext.

To remove a per-stream context structure that is associated with a file stream, call 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

FsRtlInsertPerStreamContext

FsRtlRemovePerStreamContext

FsRtlSetupAdvancedHeader

FsRtlSupportsPerStreamContexts

FsRtlTeardownPerStreamContexts