Managing minifilter contexts
A context is a structure that a minifilter driver defines and that can be associated with a FltMgr object.
FltMgr provides support that allows minifilter drivers to associate their contexts with FltMgr's objects to preserve state across I/O operations.
Types of contexts
Minifilters can create and set contexts for the following objects:
- Files (Windows Vista and later)
- Instances
- Streams
- Stream handles (file objects)
- Transactions (Windows Vista and later)
- Volumes
Volume contexts must be allocated from nonpaged pool. All other context types can be allocated from paged or nonpaged pool.
Context sample code
See the CTX sample for an example of a minifilter driver that uses contexts.
How to manage contexts
The following sections describe how to manage filter contexts:
- Registering Context Types
- Creating Contexts
- Setting Contexts
- Getting Contexts
- Referencing Contexts
- Releasing Contexts
- Deleting Contexts
- Freeing Contexts
- File System Support for Contexts
- Best Practices
For information regarding the support provided by FltMgr, see Supporting minifilter contexts.