Expand Minimize

FsRtlSetupAdvancedHeaderEx function

The FsRtlSetupAdvancedHeaderEx macro is used by file systems to initialize an FSRTL_ADVANCED_FCB_HEADER structure for use with both stream and file contexts.

Syntax


VOID FsRtlSetupAdvancedHeaderEx(
  _In_      PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader,
  _In_opt_  PFAST_MUTEX FastMutex,
  _In_opt_  PVOID *FileContextSupportPointer
);

Parameters

AdvancedHeader [in]

Pointer to the FSRTL_ADVANCED_FCB_HEADER structure to be initialized.

FastMutex [in, optional]

Pointer to an initialized fast mutex that will be used to synchronize access to certain FSRTL_ADVANCED_FCB_HEADER members (for more information, see FSRTL_ADVANCED_FCB_HEADER). The fast mutex must be allocated from nonpaged pool. This parameter is optional and can be NULL. Callers should set this parameter to NULL if they intend to use an already existing fast mutex object. If FastMutex is NULL, the caller must explicitly set the FastMutex member of the FSRTL_ADVANCED_FCB_HEADER structure, contained in the stream context object, to point to the existing fast mutex. (This can be done before or after calling FsRtlSetupAdvancedHeaderEx.)

FileContextSupportPointer [in, optional]

A pointer to a pointer field used by the file system runtime library (FSRTL) package to track file contexts.

This parameter is optional and can be NULL. In particular:

  • For Microsoft Windows operating systems released prior to Windows Vista: Callers must set this parameter to NULL.

  • For Windows operating systems starting with Windows Vista: If FileContextSupportPointer is not NULL, FileContextSupportPointer must be a pointer to a PVOID variable inside a per-file structure for the file system that created the structure. To indicate that the file system driver does not support file contexts, callers must set FileContextSupportPointer to NULL.

Return value

None

Remarks

File systems use the FsRtlSetupAdvancedHeaderEx macro to initialize an FSRTL_ADVANCED_FCB_HEADER structure for use with stream and file contexts.

When the advanced FCB header structure is no longer required, the file system must call FsRtlTeardownPerStreamContexts to free all associated stream and file context structures.

For more information, see Tracking Per-Stream Context in a Legacy File System Filter Driver.

Requirements

Version

Available on Update Rollup for Microsoft Windows 2000 Service Pack 4 (SP4) and on Windows XP and later versions of the Windows operating systems.

Header

Ntifs.h (include Ntifs.h or Fltkernel.h)

IRQL

PASSIVE_LEVEL

See also

FSRTL_ADVANCED_FCB_HEADER
FSRTL_PER_STREAM_CONTEXT
FsRtlGetPerStreamContextPointer
FsRtlInitPerStreamContext
FsRtlInsertPerStreamContext
FsRtlLookupPerStreamContext
FsRtlRemovePerStreamContext
FsRtlSupportsPerStreamContexts
FsRtlTeardownPerStreamContexts

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft