Export (0) Print
Expand All
Expand Minimize

FsRtlInsertPerFileContext routine

The FsRtlInsertPerFileContext routine associates a FSRTL_PER_FILE_CONTEXT object with a driver-specified context object for a file.

Syntax


NTSTATUS FsRtlInsertPerFileContext(
  _In_  PVOID *PerFileContextPointer,
  _In_  PFSRTL_PER_FILE_CONTEXT Ptr
);

Parameters

PerFileContextPointer [in]

A pointer to an opaque pointer used by the file system runtime library (FSRTL) package to track file contexts. To retrieve this pointer from a file object, use the FsRtlGetPerFileContextPointer macro.

Ptr [in]

A pointer to the driver-specific context structure.

Return value

The FsRtlInsertPerFileContext routine returns STATUS_SUCCESS, or an appropriate error code, such as:

Return codeDescription
STATUS_INVALID_DEVICE_REQUEST

The underlying file system does not support filter file contexts. You can use the FsRtlSupportsPerFileContexts macro to check whether a file system supports per file context objects.

STATUS_INSUFFICIENT_RESOURCES

The system could not allocate resources (typically memory).

 

Remarks

Requirements

Version

Available in Windows Vista and later versions of the Windows operating system.

Header

Ntifs.h (include FltKernel.h or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<=APC_LEVEL

See also

FSRTL_PER_FILE_CONTEXT
FsRtlGetPerFileContextPointer
FsRtlLookupPerFileContext
FsRtlRemovePerFileContext
Tracking Per-File Context in a Legacy File System Filter Driver

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft