Training
Module
Apply filters on functions - Training
Learn how combining native functions with prompts can accomplish customized tasks with the Semantic Kernel SDK.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In this topic we explain how to use Visual Studio to start writing a new filter driver. Filter drivers are different from device function drivers, software drivers, and file system drivers, which we cover in other topics. To learn about filter drivers and how they differ from other types of drivers, see the following topics.
To begin, first determine which driver model is appropriate for your filter driver. For help determining which model is best for you, see Choosing a Driver Model. If you are writing a filter driver for a hardware device, determine where your device fits in the list of technologies described in Device and Driver Technologies. See the documentation for that particular technology to see whether there is any guidance for choosing a filter driver model. The recommended filter driver model varies from one technology to the next. For some technologies, the documentation recommends using the User Mode Driver Framework (UMDF), the Kernel Mode Driver Framework (KMDF), or the Windows Driver Model (WDM). For other technologies, the documentation gives explicit details on how to write a filter driver. Some technologies have mini filter models. For some technologies, there might not be any recommendation for a filter driver model.
Next, determine which of the following cases describes your driver model recommendation and follow the steps:
If your device technology has a specific filter or minifilter model, check to see if Visual Studio has a template for the model.
If your device technology has a specific filter model or a minifilter model, and you can't find a template for your type of filter driver, refer to your technology-specific documentation for guidance to determine whether to use UMDF, KMDF, or WDM.
In Visual Studio, on the File menu, choose New | Project.
In Visual Studio, in the New Project dialog box, under Windows Driver, select WDM.
Fill in the Name and Location boxes, and select OK.
At this point, you have an empty WDM driver project. In the Solution Explorer window, select and hold (or right-click) your driver project, and choose Add | New Item.
In the Add New Item dialog box, select C++ File (.cpp), enter a name for your file, and select OK.
Note If you want to create a .c file instead of a .cpp file, enter a name that has the .c extension.
Implement the functions required by your filter. As you implement and organize your functions, you might decide to add additional .cpp or .c files.
Determine whether UMDF, KMDF, or WDM is the best model for your filter driver. For help, see Choosing a Driver Model.
In Visual Studio, on the File menu, choose New | Project.
In Visual Studio, in the New Project dialog box, under Windows Driver, select one of the following templates:
Note When you create a new KMDF or UMDF driver, you must select a driver name that has 32 characters or less. This length limit is defined in wdfglobals.h.
Implement the functions required by your filter. Create new .c or .cpp files as needed.
If you are not sure which template to use, consider reading or posting to the Windows Hardware WDK and Driver Development forum.
Training
Module
Apply filters on functions - Training
Learn how combining native functions with prompts can accomplish customized tasks with the Semantic Kernel SDK.
Documentation
Creating a New Software Driver - Windows drivers
In this topic we explain how to use Visual Studio to start writing a new software driver.
Creating a Driver From Existing Source Files - Windows drivers
The WDK is integrated with Microsoft Visual Studio, and uses the same compiler and build tools that you use to build Visual Studio solutions and projects.
Creating a New Device Function Driver - Windows drivers
In this article, we explain how to use Visual Studio to start writing a new device function driver.