Expand Minimize

FltSupportsFileContextsEx routine

The FltSupportsFileContextsEx routine determines whether the file system or the filter manager support file contexts for a given file.

Syntax


BOOLEAN FltSupportsFileContextsEx(
  _In_      PFILE_OBJECT FileObject,
  _In_opt_  PFLT_INSTANCE Instance
);

Parameters

FileObject [in]

File object pointer for the file. This parameter is required and cannot be NULL.

Instance [in, optional]

Opaque instance pointer for the caller. This parameter is optional and can be NULL. For more information about this parameter, see the following Remarks section.

Return value

FltSupportsFileContextsEx returns TRUE if the file system or filter manager supports file contexts for the file; FALSE otherwise.

Remarks

Minifilter drivers call the FltSupportsFileContextsEx routine to determine whether the underlying file system or the filter manager supports file contexts for the file that is represented by a given file object.

For file systems (such as FAT) that support only a single data stream per file, file contexts are equivalent to stream contexts. Such file systems usually support stream contexts but do not support file contexts. Instead, the filter manager provides file context support, using the file system's existing support for stream contexts. For minifilter instances attached to these file systems, FltSupportsFileContexts returns FALSE, while FltSupportsFileContextsEx returns TRUE (when a valid non-NULL value is passed for the Instance parameter).

If a non-NULL value is supplied for the Instance parameter, FltSupportsFileContextsEx returns TRUE if the file system or the filter manager supports file contexts for the file; FALSE otherwise.

If the Instance parameter is NULL, FltSupportsFileContextsEx returns TRUE only if the file system supports file contexts for the file. Otherwise, it returns FALSE, even if the filter manager supports file contexts for the file.

Note that a file system might support file contexts for some types of files but not for others. For example, NTFS and FAT do not support file contexts for paging files.

To allocate a new context, call FltAllocateContext.

To delete a file context, call FltDeleteFileContext or FltDeleteContext.

To get the file context for a file object, call FltGetFileContext.

To set a file context, call FltSetFileContext.

To decrement the reference count on a context, call FltReleaseContext.

Requirements

Version

This routine is available on Windows Vista and later.

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FltAllocateContext
FltDeleteContext
FltDeleteFileContext
FltGetFileContext
FltReleaseContext
FltSetFileContext
FltSupportsFileContexts

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft