Expand Minimize

FltGetStreamHandleContext routine

The FltGetStreamHandleContext routine retrieves a context that was set for a stream handle by a given minifilter driver instance.

Syntax


NTSTATUS FltGetStreamHandleContext(
  _In_   PFLT_INSTANCE Instance,
  _In_   PFILE_OBJECT  FileObject,
  _Out_  PFLT_CONTEXT  *Context
);

Parameters

Instance [in]

Opaque instance pointer for the minifilter driver instance whose context is to be retrieved.

FileObject [in]

Pointer to a file object for the stream handle.

Context [out]

Pointer to a caller-allocated variable that receives the address of the context.

Return value

FltGetStreamHandleContext returns STATUS_SUCCESS or an appropriate NTSTATUS value, such as one of the following:

Return codeDescription
STATUS_NOT_FOUND

No matching context was found. This is an error code.

STATUS_NOT_SUPPORTED

The file system does not support per-stream contexts for this file stream. This is an error code.

 

Remarks

FltGetStreamHandleContext retrieves a context that was set for a stream handle by a given minifilter driver.

FltGetStreamHandleContext increments the reference count on the context that the Context parameter points to. When this context pointer is no longer needed, the caller must decrement its reference count by calling FltReleaseContext. Thus every successful call to FltGetStreamHandleContext must be matched by a subsequent call to FltReleaseContext.

To set a context for a stream handle, call FltSetStreamHandleContext.

To allocate a new context, call FltAllocateContext.

To delete a stream handle context, call FltDeleteStreamHandleContext or FltDeleteContext.

Requirements

Target platform

Universal

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FltAllocateContext
FltDeleteContext
FltDeleteStreamHandleContext
FltReleaseContext
FltSetStreamHandleContext

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft