The FsRtlLookupPerStreamContext macro retrieves a per-stream context structure for a file stream.
PFSRTL_PER_STREAM_CONTEXT FsRtlLookupPerStreamContext( _In_ PFSRTL_ADVANCED_FCB_HEADER StreamContext, _In_opt_ PVOID OwnerId, _In_opt_ PVOID InstanceId );
- 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.
- OwnerId [in, optional]
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.
- InstanceId [in, optional]
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.
FsRtlLookupPerStreamContext returns a pointer to the first matching per-stream context that is found. If no match is found, or if the file system does not support filter contexts, FsRtlLookupPerStreamContext returns NULL.
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.
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.
|This routine is available on Update Rollup for Windows 2000 Service Pack 4 (SP4) and on Windows XP and later.|