This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
  • C 69%
  • C++ 29.8%
  • HTML 0.8%
  • PowerShell 0.1%
  • ASL 0.1%
  • Other 0.1%
Find a file
5an7y-Microsoft 2ee527bfeb
Merge pull request #1397 from 5an7y-Microsoft/main
Expose the NT_TARGET_VERSION in the build samples script & workflow update
2026-07-02 13:27:26 -07:00
.github Merge pull request #1397 from 5an7y-Microsoft/main 2026-07-02 13:27:26 -07:00
_wdk_utils/winget/configs Split winget DSC config into per-VS-edition files 2026-05-08 12:03:03 -07:00
audio New SDCAVAD sample. 2025-12-15 14:00:37 -08:00
avstream [avstream/sampledevicemft] Use C++17 (#1256) 2025-01-21 17:32:28 -08:00
bluetooth Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
filesys Merge branch 'main' into fix-transaction-processing 2024-12-29 18:38:40 +01:00
general Reset to correct toolset 2026-06-10 11:48:06 -07:00
gnss Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
gpio/samples Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
hid Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
input Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
network Add variants to the NetVAdapterLibrary to support the requirements of different adapter types. 2026-06-19 13:12:38 -07:00
nfc/NfcCxSample Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
nfp/net Remove x86 and ARM configurations for sample projects. (#1126) 2024-02-26 09:47:25 -08:00
pofx Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
pos/drivers Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
powerlimit 50256705 2024-05-27 08:07:49 -07:00
print Remove Print Driver Samples (#1017) 2023-08-10 16:28:02 -07:00
prm Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
sd/miniport/sdhc Fix for sdhc sample using bootflags as a registry (#1207) 2024-08-20 14:41:03 -07:00
security/elam Remove x86 and ARM configurations for sample projects. (#1126) 2024-02-26 09:47:25 -08:00
sensors Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
serial Fixing C5286 in serial/serial /ioctl.c 2025-07-31 13:45:16 -07:00
setup/devcon devcon: In MSG_FAILURE, show the cmd name (#1350) 2026-06-01 10:07:39 -07:00
simbatt Merge pull request #1063 from forderud/simbatt-relative-rm 2025-10-09 09:30:38 -07:00
smartcrd Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
spb Tags unreferenced parameters as such 2025-07-01 12:33:29 -07:00
storage fix validation workflow error 2025-06-24 17:26:15 -07:00
thermal Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
tools Add a KASAN demo sample (#1228) 2024-11-04 14:16:47 -08:00
TrEE Remove x86 and ARM configurations for sample projects. (#1126) 2024-02-26 09:47:25 -08:00
usb Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
video Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
wia Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
wil@3c00e7f1d8
wmi Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
.gitattributes Standarize INF files enconding to UTF-16 (LE with BOM); renormalize files 2024-07-01 17:33:16 -07:00
.gitignore Generate and provide overview reports (#993) 2023-06-15 11:51:39 -07:00
.gitmodules
Build-Samples.ps1 Drop hardcoded version defaults and the un-discoverable label map 2026-06-23 11:05:03 -07:00
BuildEnvironment.ps1 fix: detect WDK component in both full VS and Build Tools 2026-04-07 14:55:32 -07:00
Building-Locally.md Auto-discover _NT_TARGET_VERSION; remove the TargetVersion axis 2026-06-23 10:38:40 -07:00
Directory.Build.props Update Windows SDK and WDK package versions 2026-05-01 10:51:16 -07:00
exclusions.csv Auto-discover _NT_TARGET_VERSION; remove the TargetVersion axis 2026-06-23 10:38:40 -07:00
Get-NtTargetVersions.ps1 Auto-discover _NT_TARGET_VERSION; remove the TargetVersion axis 2026-06-23 10:38:40 -07:00
LICENSE
ListAllSamples.ps1 Remove Samples.txt: discover samples dynamically via ListAllSamples 2026-03-27 16:04:47 -07:00
packages.config Update package versions in packages.config 2026-05-01 10:50:19 -07:00
README.md Update README to reference GH Actions doc 2023-03-21 15:44:34 -07:00
SECURITY.md Microsoft mandatory file 2022-05-23 20:02:42 +00:00

Driver samples for Windows 11

These are the official Microsoft Windows Driver Kit (WDK) driver code samples for Windows 11. They provide a foundation for Universal Windows driver support of all hardware form factors, from phones to desktop PCs. Use these samples with Visual Studio 2022 and Windows Driver Kit (WDK) 11.

Windows Driver Kit documentation

Windows 11 driver development

Use Visual Studio 2022 and Windows Driver Kit (WDK) 11 to build, test, and deploy your drivers. With Windows 11, the driver development environment is integrated into Visual Studio. To get started, download the driver development kits and tools for Windows 11.

Download the WDK, WinDbg, and associated tools

Windows Driver Kit (WDK)

Take a look at the compilation of the new and changed driver-related content for Windows 11. Areas of improvement include camera, print, display, Near Field Communication (NFC), WLAN, Bluetooth, and more.

Find out what's new in the WDK

Universal Windows drivers

Write one driver that runs on Windows 11 for desktop editions, as well as other Windows editions that share a common set of interfaces.

Getting Started with Universal Windows drivers

Windows Driver Frameworks

The Windows Driver Frameworks (WDF) are a set of libraries that make it simple to write high-quality device drivers.

WDF driver development guide

Samples

Use the samples in this repo to guide your Windows driver development. Whether you're just getting started or porting an older driver to the newest version of Windows, code samples are valuable guides on how to write drivers.

For information about important changes that need to be made to the WDK sample drivers before releasing device drivers based on the sample code, see the following topic:

From Sample Code to Production Driver - What to Change in the Samples

Build your first driver

If you're writing your first driver, use these exercises to get started. Each exercise is independent of the others, so you can do them in any order.

Write a UMDF driver based on a template

Write a KMDF Hello World driver

Write a KMDF driver based on a template

Use GitHub Actions to build a simple driver project

Microsoft Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.