Download the Windows Driver Kit (WDK)
The WDK is used to develop, test, and deploy Windows drivers.
Runtime requirements
You can run the Windows 10, version 2004 WDK on Windows 7 and later, and use it to develop drivers for these operating systems:
Client OS | Server OS |
---|---|
Windows 10 | Windows Server 2019, Windows Server 2016 |
Windows 8.1 | Windows Server 2012 R2 |
Windows 8 | Windows Server 2012 |
Windows 7 | Windows Server 2008 R2 SP1 |
WDK for Windows 10, version 2004
Step 1: Install Visual Studio 2019
The WDK requires Visual Studio. For more information about system requirements for Visual Studio, see Visual Studio 2019 System Requirements.
The following editions of Visual Studio 2019 support driver development for this release:
When you install Visual Studio 2019, select the Desktop development with C++ workload. The Windows 10 Software Development Kit (SDK) is automatically included, and is displayed in the right-hand Summary pane. Note that the version of the SDK that is compatible with the WDK for Windows 10, version 2004 may not be the default SDK. To select the correct SDK:
In Visual Studio Installer, on the Individual components tab, search for Windows 10 SDK (10.0.19041.0), select this version and continue with install. Note that Visual Studio will automatically install Windows 10 SDK (10.0.19041.1) on your machine.
If you already have Visual Studio 2019 installed, you can install the Windows 10 SDK (10.0.19041.1) by using the Modify button in Visual Studio install.
WDK has Spectre mitigation enabled by default but requires spectre mitigated libraries to be installed with Visual Studio for each architecture you are developing for. Additionally, developing drivers for ARM/ARM64 require the build tools for these architectures to also be installed with Visual Studio. To locate these items you will need to know the latest version of MSVC installed on your system.
To find the latest version of MSVC installed on your system, in Visual Studio Installer go to workload page, on the right pane under installation details, expand Desktop development with C++ and locate the MSVC v142 — VS 2019 C++ x64/x86 build tools (V14.xx) — note where xx should be the highest version available.
With this information (v14.xx), go to Individual components and search for v14.xx. This will return the tool sets for all architectures, including Spectre mitigated libs. Select the driver architecture you are developing for.
For example, searching for v14.25 returns the following:
Step 2: Install WDK for Windows 10, version 2004
The WDK Visual Studio extension is included in the default WDK installation.
Enterprise WDK (EWDK) for Windows 10, version 2004
The EWDK is a standalone, self-contained command-line environment for building drivers. It includes the Visual Studio Build Tools, the SDK, and the WDK. The latest public version of the EWDK contains Visual Studio 2019 Build Tools 16.3.0 and MSVC toolset v14.23. To get started, mount the ISO and run LaunchBuildEnv.
The EWDK also requires the .NET Framework version 4.7.2. For more information about other requirements for the .NET Framework, see .NET Framework system requirements.
EWDK with Visual Studio Build Tools
Driver samples for Windows 10
To download the driver samples, do one of the following:
- Go to the driver samples page on GitHub, click Clone or download, and then click Download ZIP.
- Download the GitHub Extension for Visual Studio, and then connect to the GitHub repositories.
- Browse the driver samples on the Microsoft Samples portal.
Driver Development Tools
Purpose
The Windows Driver Kit (WDK) provides a set of tools that you can use to develop, analyze, build, install, and test your driver. The WDK includes powerful verification tools that are designed to help you detect, analyze, and correct errors in driver code during the development process. Many of these tools can be used very early in the development process where they are most critical and can save you the most time and effort.
Overview
The Windows Driver Kit (WDK) is fully integrated with Microsoft Visual Studio 2015. The WDK uses the same compiler and build tools that you use to build Visual Studio projects. The code analysis and verification tools can now be easily configured and launched from the Visual Studio development environment, so that you can find and fix problems in your driver source early in the development cycle.
The WDK provides a sophisticated driver test framework and a set of device fundamental tests that you can use to automatically build, deploy, and test your driver on remote test systems. The WDK provides the tools to make testing and debugging drivers more convenient and effective than before.
Driver Development Tools Documentation
This section describes the tools and techniques that can help you during development:
Resources
Universal Windows drivers allow developers to create a single driver that runs across multiple different device types, from embedded systems to tablets and desktop PCs. Hardware developers can use their existing components and device drivers across different form factors.
You can convert projects and solutions that you created with WDK 8 or Windows Driver Kit (WDK) 8.1 to work with Windows Driver Kit (WDK) 10 and Visual Studio 2015. Before you open the projects or solutions, run the ProjectUpgradeTool. The ProjectUpgradeTool converts the projects and solutions so that they can be built using WDK for Windows 10.
You can use the ApiValidator.exe tool to verify that the APIs that your driver calls are valid for a Universal Windows driver. The tool returns an error if your driver calls an API that is outside the set of valid APIs for Universal Windows drivers. This tool is part of the WDK for Windows 10.
More information and tips for driver developers about using the WDK and the Visual Studio build environment.
For specific information about building drivers, and using the verification tools and tests in the Visual Studio development environment.
Installing preview versions of the Windows Driver Kit (WDK)
This page contains installation instructions for Insider Preview (pre-release) versions of the Windows Driver Kit (WDK). The download links for the latest pre-release version of the WDK and the EWDK are on https://www.microsoft.com/software-download/windowsinsiderpreviewWDK.
For info about the latest released versions of the WDK, see Download the Windows Driver Kit (WDK). For downloads of earlier versions of the WDK, see Other WDK downloads.
Install Windows Driver Kit (WDK) Insider Preview
1. Install Visual Studio
- The WDK now supports Visual Studio 2019. All editions are supported. The WDK no longer supports Visual Studio 2017.
- Download from https://visualstudio.microsoft.com/vs/preview/.
- Select workload: Development with C++.
- ARM: To build ARM drivers you must additionally install the component: Individual components -> Compilers, build tools, and runtimes -> Visual C++ compilers and libraries for ARM.
- ARM64: Currently not supported.
2. Disable strong name validation
The WDK Visual Studio Extensions are currently not strong name signed. Run the following commands from an elevated command prompt to disable strong name validation:
3. Install SDK Insider Preview
4. Install WDK Insider Preview
During installation you will see the Visual Studio installer install the WDK Visual Studio Extensions.
Install Enterprise WDK (EWDK) Insider Preview
The EWDK is a standalone self-contained command-line environment for building drivers. It includes Build Tools for Visual Studio 2019, the SDK, the WDK and support for ARM64 driver development. See more at Installing the Enterprise WDK.
To get started mount the ISO and select LaunchBuildEnv.
Run-time requirements for the WDK and the EWDK
The WDK requires Visual Studio. For more info about system requirements for Visual Studio, see Visual Studio 2019 System Requirements.
In addition, the EWDK requires .NET 4.7.2. For more info about what .NET runs on, see .NET Framework system requirements.
You can use the WDK Insider Preview and the EWDK Insider Preview to develop drivers for these operating systems: