summaryrefslogtreecommitdiff
path: root/filesys/miniFilter/ctx/README.md
blob: 4c73e6f27978461bb3a509677dd2d96546a34721 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
---
page_type: sample
description: "Demonstrates how to attach contexts to instances, files, streams, and stream handles in your minifilter."
languages:
- cpp
products:
- windows
---

<!---
    name: Ctx File System Minifilter Driver
    platform: WDM
    language: cpp
    category: FileSystem
    description: Demonstrates how to attach contexts to instances, files, streams, and stream handles in your minifilter. 
    samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617648
--->

# Ctx File System Minifilter Drive

The Ctx minifilter is an example that demonstrates how to attach contexts to instances, files, streams, and stream handles in your minifilter.

## Universal Windows Driver Compliant

This sample builds a Universal Windows Driver. It uses only APIs and DDIs that are included in OneCoreUAP.

## Design and Operation

The *Ctx* minifilter demonstrates how to attach and remove contexts from instances, files, steams, and stream handles. *Ctx* attaches a context whenever one of these objects is created. While attaching a context to a file, the sample also creates a stream and stream handle context. All contexts are ultimately deleted by the filter manager using the callback function that the *Ctx* minifilter provides.

For more information on file system minifilter design, start with the [File System Minifilter Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff540402) section in the Installable File Systems Design Guide.