FsRtlLookupPerStreamContext macro (ntifs.h)

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

Syntax

void FsRtlLookupPerStreamContext(
   _sc,
   _oid,
   _iid
);

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.

Return value

None

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.

Requirements

Requirement Value
Minimum supported client Windows 2000 SP4 Update Rollup; Windows XP
Target Platform Desktop
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

FsRtlInsertPerStreamContext

FsRtlRemovePerStreamContext

FsRtlSetupAdvancedHeader

FsRtlSupportsPerStreamContexts

FsRtlTeardownPerStreamContexts