The FltSupportsFileContextsEx routine determines whether the file system or the filter manager support file contexts for a given file.
BOOLEAN FltSupportsFileContextsEx( _In_ PFILE_OBJECT FileObject, _In_opt_ PFLT_INSTANCE Instance );
- 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.
FltSupportsFileContextsEx returns TRUE if the file system or filter manager supports file contexts for the file; FALSE otherwise.
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 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.
|This routine is available on Windows Vista and later.|