0% found this document useful (0 votes)
423 views

What's New in Driver Development For Windows 11, Version 22H2

Windows 11

Uploaded by

Jedson Araujo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
423 views

What's New in Driver Development For Windows 11, Version 22H2

Windows 11

Uploaded by

Jedson Araujo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 105

Contents

What's new in driver development for Windows 11, version 22H2


New in previous releases
What's new in driver development for Windows 11, version 21H2
What's new in driver development for Windows Server 2022
What's new in driver development for Windows 10, version 2004
What's new in driver development for Windows 10, version 1903
Downloads
Download the Windows Driver Kit (WDK)
Installing preview versions of the WDK
Other WDK downloads
WDK known issues
Bring up guide
Developing, Testing, and Deploying Drivers
Windows Hardware Dev Center Dashboard
Device and Driver Installation
Kernel-Mode Driver Architecture Design Guide
Windows Driver Frameworks
Windows Driver Security
Windows Debugging Tools
Windows Store Device Apps
Driver Technologies
Overview of Driver Technologies
3D print devices
ACPI
Audio
Battery Drivers
Biometric Drivers
Bluetooth Drivers
Component Firmware Update (CFU)
Display and graphics drivers
Driver Development Tools
File systems and minifilter drivers
Getting started with Windows drivers
GNSS drivers
GPIO drivers
Hardware notifications
HID Drivers
IEEE Drivers
Imaging device drivers
Kernel-mode driver technology
Mobile broadband
Multifunction device drivers
NetAdapterCx
Network drivers
NFC device drivers
Parallel port drivers
Partner application development
PCI drivers
PCMCIA drivers
Point of Service device drivers
Power management technologies
Print device drivers
SD card bus drivers
Sensor drivers
Serial port drivers
Smartcard device drivers
SPB drivers
Storage device drivers
Storage Firmware Update (SFU)
Streaming media device drivers
Test Authoring and Execution Framework (TAEF)
Universal Serial Bus (USB)
Windows Device Testing Framework (WDTF)
Windows Hardware Error Architecture (WHEA)
Windows portable device drivers
Windows driver API reference
Windows driver samples
What's new in driver development for Windows 11,
version 22H2
11/23/2022 • 2 minutes to read • Edit Online

This section describes new features and updates for driver development in Windows 11, version 22H2.

ACPI
The ACPI documentation has been updated with new _OSI string information for Windows 11, version 22H2.
How to Identify the Windows Version in ACPI by Using _OSI (Updated)

Audio
To improve reliability and debuggability new Windows 11 APIs for Audio Processing Objects are available.
Windows 11 provides additional capabilities with the use of resource groups and these are now discussed
Audio Hardware Resource Management.
Audio experience for these devices can be optimized for specific device postures, such as when a device is
held in portrait mode. This is described in Supporting Audio Posture.
KSStudio documentation is now available on line at KsStudio Utility.

Camera and streaming media drivers


The camera driver documentation has been updated with information on background segmentation and eye
gaze modes available in Windows 11, version 22H2.
Background segmentation portrait mode and eye gaze stare mode driver sample (New)
KSPROPERTY_CAMERACONTROL_EXTENDED_BACKGROUNDSEGMENTATION (Updated)
KSPROPERTY_CAMERACONTROL_EXTENDED_EYEGAZECORRECTION (Updated)
USB Video Class (UVC) camera implementation guide (Updated)

Driver security
New code scanning CodeQL rules and updated installation directions, are now available. For more
information, see CodeQL and the Static Tools Logo Test.

File system and filter drivers


The ability to do trusted kernel-mode file copy was introduced in Windows 11, version 22H2. This feature
includes the ability for filters to easily detect copy scenarios.

Mobile broadband
Windows 11, version 22H2 introduces the following mobile broadband features:
MBIM Extensions Release number 4.0 (MBIMEx 4.0) introduces support for 5G SA Phase 2 features. The
5G SA Phase 2 feature set includes support for end-to-end URSP handling and multiple concurrent eMBB
network slices.
MBIMEx 4.0 introduces access to an eSIM in the inactive SIM slot.
An errata for MBIMEx 3.0 updates the original MBIMEx 3.0 specification.

Print device apps


The Print support app (PSA) design guide has been updated with information about new PSA functionality
available starting in Windows 11, version 22H2.
Display name localization and PDL Passthrough API integration
Page level feature support and operation attributes
Enhancing the print dialog with PSA
PDL conversion with host-based processing flags
Set Print Device Capabilities (PDC) update policy

Provisioning support for loading pre-production drivers


How to test pre-production drivers with Secure Boot enabled

Windows Debugging Tools


Debugging Tools for Windows supports kernel debugging over a network cable using multiple Physical
Functions (PFs) on the supported NICs. This approach improves efficiency of debugging, particularly in traffic
heavy cloud environments. For more information see, Setting Up 2PF Kernel-Mode Debugging using KDNET.
A new low level OS independent debugger transport – EXDI is described in Configuring the EXDI Debugger
Transport. This transport can connect to virtualized environments such as QEMU, this is described in Setting
Up QEMU Kernel-Mode Debugging using EXDI.
AppVerifier test content is now updated and the documentation is now available online – Application Verifier
- Overview.

WPP Recorder
Drivers can add timestamps to Inflight Trace Recorder (IFR) log entries. Timestamps can specify millisecond or
tenth of a microsecond granularity.
Inflight Trace Recorder
WPP_RECORDER_TRI_STATE enumeration
RECORDER_LOG_CREATE_PARAMS structure
WppRecorderLogCreate macro (wpprecorder.h)

Related Topics
For information on what was new for drivers in past Windows releases, see the following pages:
Driver development changes for Windows 11, version 21H2
Driver development changes for Windows Server 2022
Driver development changes for Windows 10, version 2004
Driver development changes for Windows 10, version 1903
Back to Top
What's new in driver development for Windows 11,
version 21H2
11/23/2022 • 2 minutes to read • Edit Online

This section describes new features and updates for driver development in Windows 11, version 21H2.

Camera
Digital Window overview
Privacy shutter notification
Create device property keys from the MS OS descriptor in USB Video Class (UVC) firmware
Microsoft extensions to USB Video Class 1.5 specification (Updated)
Network camera design guide (Updated)

HID
Use Human Interface Device (HID) class devices over a Serial Peripheral Interface (SPI) bus.
Introduction to HID over SPI
Architecture and overview for HID over the SPI transport
Plug and Play support for HID over SPI
HID over SPI power management
Error handling for HID over SPI
New API pages:
hidspicx.h header
EVT_HIDSPICX_NOTIFY_POWERDOWN
EVT_HIDSPICX_RESETDEVICE
HIDSPICX_DEVICE_CONFIG
HIDSPICX_REPORT
HidSpiCxDeviceConfigure
HidSpiCxDeviceInitConfig
HidSpiCxNotifyDeviceReset

Print devices
Print support app design guide
Print support app association

Related Topics
For information on what was new for drivers in past Windows releases, see the following pages:
Driver development changes for Windows 11
Driver development changes for Windows Server 2022
Driver development changes for Windows 10, version 2004
Driver development changes for Windows 10, version 1903
Back to Top
What's new in Windows Server 2022
11/23/2022 • 2 minutes to read • Edit Online

This section describes new features and updates for driver development in Windows Server 2022.

Kernel
DMA/MDL updates
New API pages:
PCREATE_COMMON_BUFFER_FROM_MDL callback function
DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_TYPE enumeration
DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION_ACCESS_TYPE enumeration
DMA_COMMON_BUFFER_EXTENDED_CONFIGURATION structure
Updated:
DMA_OPERATIONS structure (new field CreateCommonBufferFromMdl )
NUMA (Non-Uniform Memory Access)
New API pages:
KeQuer yNodeActiveAffinity2
KeQuer yNodeActiveProcessorCount
Updated:
KeQuer yNodeActiveAffinity
xKeQuer yLogicalProcessorRelationship

NetAdapterCx
The new NetAdapterCx platform-level device reset (PLDR) feature provides an effective way to reset and
recover malfunctioning network devices without rebooting the system.
NetAdapterCx support for the following hardware offloads has been updated:
Checksum offload
Generic send offload (GSO)
Receive Segment Coalescing (RSC)

Networking
New network driver documentation and features include:
The new NDIS packet timestamping feature supports the hardware timestamping capability of a network
interface card (NIC) for the Precision Time Protocol (PTP) version 2.
The new NDIS Poll Mode feature is an OS controlled polling execution model that drives the network
interface datapath.
The Virtual Machine Multiple Queues (VMMQ) NIC offload technology extends Native RSS (RSSv1) to a
Hyper-V virtual environment.

Windows Driver Frameworks (WDF)


In Windows Server 2022, the Windows Driver Framework (WDF) includes Kernel-Mode Driver Framework
(KMDF) version 1.33 and User-Mode Driver Framework (UMDF) version 2.33.
For info on what's included in these framework versions, see What's New for WDF Drivers in Windows 10. To
see what was added in previous versions of WDF, see:
KMDF Version History
UMDF Version History

Debugger
For information on what is new on the WinDbg Preview debugger, see WinDbg Preview - What's New.
Highlights include:
Portable PDB Symbols support.
Support for Open Enclave debugging- WinDbg Preview can now debug Open Enclave (OE) applications.
For user mode time travel debugging, a new timeline window displays a visual representation of important
events in your trace: exceptions, breakpoints, function calls, and memory accesses. For more information, see
WinDbg Preview - Timeline.
Updates and addtions to debug transport topics, such as Setting Up KDNET Network Kernel Debugging
Automatically, Setting Up Kernel-Mode Debugging over USB EEM on an Arm device using KDNET and Setting
Up 2PF Kernel-Mode Debugging using KDNET.
Bugcheck stop code topic addtions and updates, including listing live dump codes in a new section - Kernel Live
Dump Code Reference.

Driver Quality
New CodeQL and the Static Tools Logo Test and Supplemental Windows Driver CodeQL Queries.
Updates and additions to Driver Verfier rules, for example the new DoubleFetch rule.

Driver Security
Updates to the Driver Security Checklist.

Audio
Updated and new topics including:
Default Audio Endpoint Selection Starting in Windows 10
Multiple Voice Assistant
Voice Activation
Low Latency Audio
New online help for the KsStudio Utility.
What's new in Windows 10, version 2004
11/23/2022 • 2 minutes to read • Edit Online

This section describes new features and updates for driver development in Windows 10, version 2004
(Windows 10 May 2020 Update).
Windows Drivers
Windows 10, version 2004 is a transition release for universal drivers. In this release, universal drivers still exist,
but are being replaced by Windows Drivers. A Windows Driver is a universal driver with a few additional
requirements.
Windows Drivers are distinguished from Windows Desktop Drivers. While Windows Drivers run on all Windows
editions, Windows Desktop Drivers run only on Windows 10 Desktop editions.
No changes are required to universal drivers for the version 2004 release, but documentation is available now
so that you can plan ahead for upcoming changes.
For information about how to build, install, deploy, and debug a Windows Driver, see Getting Started with
Windows Drivers.
Windows Hardware Error Architecture (WHEA )
WHEA includes a new interface (v2). For info about how to register as an error source and report errors, see
Using WHEA on Windows 10.
Display and Graphics Drivers
Several new and enhanced display and graphics driver features are available in Windows 10, version 2004,
including D3D12 mesh shader support, sampler support, raytracing extensions, video motion estimation, and
video protected resources support. See What's New for Windows 10 Display and Graphics Drivers for more
details about these new features.
Storage Drivers
A storage miniport driver can now get and set more information about a device's internal state, including the
ability to reset a device. See IOCTL_STORAGE_GET_DEVICE_INTERNAL_LOG and StorPor tHardwareReset
as good starting points.
Windows Debugger
WinDbg Preview
Updates to WinDbg Preview to cover new features such as WinDbg Preview - Timelines. Time travel timelines
allows for the visualization of time travel code execution traces.
Stop Codes
Updates to the Bug Check Code Reference topics and the addition of new parameters to topics such as
Bug Check 0x1A: MEMORY_MANAGEMENT and Bug Check 0xC4:
DRIVER_VERIFIER_DETECTED_VIOLATION.
New stop codes such as Bug Check 0x1DA: HAL_BLOCKED_PROCESSOR_INTERNAL_ERROR, Bug Check
0x1A2: WIN32K_CALLOUT_WATCHDOG_BUGCHECK and Bug Check 0x119:
VIDEO_SCHEDULER_INTERNAL_ERROR.
Driver Security
Updates to the Driver security checklist to use the BinSkim tool.
Deprecated features
The following table describes Windows driver development features that have been removed in Windows 10.

DRIVER T EC H N O LO GY F EAT URE DEP REC AT ED IN

GNSS/Location Geolocation driver sample for Windows 10, version 1709


Windows 8.1 and related
documentation

Mobile Operator Scenarios AllowStandardUserPinUnlock Windows 10, version 1709


(Networking)

Scan/Image WSD (Web Services for Devices) Windows 10, version 1709
Challenger functionality and related
documentation

Mobile Operators Mobile broadband app experience Windows 10, version 1803
apps with Sysdev metadata packages
are deprecated in favor of MO UWP
APPS and COSA.
What's new in Windows 10, version 1903
11/23/2022 • 5 minutes to read • Edit Online

This section describes new features and updates for driver development in Windows 10, version 1903
(Windows 10 April 2019 Update).

Audio
The following is a list of new and updated Audio features in Windows 10, version 1903:
New reference topics on the Audio OEM Adapter used for Voice Activation in the new
eventdetectoroemadapter.h header.
New Far Field Audio information:
PKEY_Devices_AudioDevice_Microphone_IsFarField
KSPROPSETID_InterleavedAudio
KSPROPERTY_INTERLEAVEDAUDIO_FORMATINFORMATION
New jack description information in USB Audio 2.0 Drivers.

Camera
New Camera driver documentation and features added in Windows 10, version 1903 include:
New IR Torch extended property control to set an IR camera's infrared torch power level and duty cycle.
New KSCATEGORY_NETWORK_CAMERA device.
New and updated USB Video Class (UVC) 1.5 extension documentation for the following control selectors:
MSXU_CONTROL_FACE_AUTHENTICATION
MSXU_CONTROL_METADATA
MSUX_CONTROL_IR_TORCH

Debugging
Changes to the Debugger for Windows 10, version 1903 include the following:
New stop codes were added to allow better tracking on unique failure types in the Windows operating
system. In addition a number of existing bug check topics were expanded and updated. For more
information, see Bug Check Code Reference.
Updates to KDNET topics to improve ease of use, for example in new Setting Up KDNET Network Kernel
Debugging Automatically
Updates to IP V6 KDNET support.
New JavaScript Debugging topic

Display
Updates to Display driver development in Windows 10, version 1903 include the following:
Super Wet Ink New DDIs were added to enable front buffer rendering. See
D3DWDDM2_6DDI_SCANOUT_FLAGS and
PFND3DWDDM2_6DDI_PREPARE_SCANOUT_TRANSFORMATION.
Variable Rate Shading Enables allocation of rendering performance/power at varying rates across
rendered images. See PFND3D12DDI_RS_SET_SHADING_RATE_0062 and
D3D12DDI_SHADING_RATE_0062.
Collect Diagnostic Info Allows the OS to collect a private data from drivers for graphics adapters
which consist of both rendering and display functions. See DXGKDDI_COLLECTDIAGNOSTICINFO.
Background Processing Allows user mode drivers to express desired threading behavior, and the
runtime to control/monitor it. User mode drivers would spin up background threads and assign the
threads as low a priority as possible, and rely on the NT scheduler to ensure these threads don’t disrupt
the critical-path threads, generally with success. See
PFND3D12DDI_QUEUEPROCESSINGWORK_CB_0062.
Driver Hot Update Reduce server downtime as much as possible when an OS component needs to be
updated. See DXGKDDI_SAVEMEMORYFORHOTUPDATE and
DXGKDDI_RESTOREMEMORYFORHOTUPDATE.

Networking
NetAdapterCx
In the NetAdapter WDF class extension (NetAdapterCx), Net ring buffers have been replaced by Net rings, which
have a new interface for sending and receiving network data using net ring iterators. The following is a list of
new topics:
Introduction to net rings
Sending network data with net rings with a new animation that illustrates how to send data
Receiving network data with net rings with a new animation that illustrates how to receive data
Canceling network data with net rings
New headers that support this feature include the following:
Ring.h
Ringcollection.h
Netringiterator.h
The following is a list of NetAdapterCx content updates:
Default adapter objects have been removed in favor of a single adapter object type. The following topics
have been updated accordingly:
Summary of NetAdapterCx objects
Device and adapter initialization
Hardware offload and packet extension DDIs have been reorganized into new headers:
Checksum.h
Checksumtypes.h
Extension.h
Rsc.h
Rsctypes.h
Fundamental networking data structures, packets and fragments, have been updated and put into new
headers:
Packet.h
Fragment.h
Overhauled Transmit and receive queues topic to include callback samples and major operations for
packet queues.

Mobile operator scenarios


New Mobile Plans content for mobile operators to sell plans to customers directly on Windows 10 devices,
through the Mobile Plans app:
Mobile Plans

Mobile broadband
The following features were added to Mobile broadband in Windows 10, version 1903:
New SIM card (UICC) file/application system access feature
New Cellular Time Information (NITZ) feature.
New modem logging with DSS feature.
New 5G data class support feature.

Power Management Framework


The power management framework (PoFx) enables a driver to define one or more sets of individually adjustable
performance states for individual components within a device. The driver can use performance states to throttle
a component's workload to provide just enough performance for its current needs. For more information, see
Component-Level Performance State Management.
Windows 10, version 1903 includes support for the Directed Power Management Framework (DFx). Related
reference documentation includes the following:
PO_FX_DEVICE_V3
PO_FX_DIRECTED_POWER_DOWN_CALLBACK callback function
PO_FX_DIRECTED_POWER_UP_CALLBACK callback function
PoFxCompleteDirectedPowerDown function
For information about testing for DFx, please see the following pages:
Directed FX Single Device Test
Directed FX System Verification Test
PwrTest DirectedFx Scenario

Print
New Print driver documentation and features added in Windows 10, version 1903 include:
New USB print IOCTLs:
IOCTL_USBPRINT_GET_INTERFACE_TYPE
IOCTL_USBPRINT_GET_PROTOCOL
IOCTL_USBPRINT_SET_PROTOCOL
New fpRegeneratePrintDeviceCapabilities PRINTPROVIDER structure member and updated
documentation.
Sensors
New features in sensor driver development in Windows 10, version 1903 include a MALT (Microsoft Ambient
Light Tool) tool for testing and calibrating screen brightness.
There were also updates to the Ambient Color OEM whitepaper.

Storage
The following Storage features were added in Windows 10, version 1903:
New Storport APIs for logging device failure and hardware protocol errors in ETW events and to query for
platform D3 desired behavior
New API to set the properties of a storage device or adapter
For file systems, new DDIs were added to support retrieving extended attributes (EA) information upon
create completion, allowing mini-filters to alter the ECP payload to change what higher filters see

Windows Driver Frameworks (WDF)


In Windows 10, version 1903, the Windows Driver Framework (WDF) includes Kernel-Mode Driver Framework
(KMDF) version 1.29 and User-Mode Driver Framework (UMDF) version 2.29.
For info on what's included in these framework versions, see What's New for WDF Drivers in Windows 10. To
see what was added in previous versions of WDF, see KMDF Version History and UMDF Version History.

Windows Hardware Error Architecture (WHEA)


Windows 10, version 1903 includes a simplified interface to WHEA. For more info, see the following pages:
Using WHEA on Windows 10
WheaAddErrorSourceDeviceDriver
WheaRepor tHwErrorDeviceDriver
WheaRemoveErrorSourceDeviceDriver
WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER
WHEA_ERROR_SOURCE_UNINITIALIZE_DEVICE_DRIVER
WHEA_ERROR_SOURCE_INITIALIZE_DEVICE_DRIVER

Wi-fi
New Wi-fi driver development documentation and features include:
New Fine Timing Measurement (FTM) feature
New WPA3-SAE Authentication feature
New Multiband Operation (MBO) support to improve roaming performance in enterprise scenarios
New beacon report offloading support
For OID commands, NDIS status indications, and TLVs for these new features, see WDI doc change history
The following topics were updated for Windows 10, version 1903:
WDI_AUTH_ALGORITHM - added support for WPA3-SAE authentication
OID_WDI_TASK_P2P_SEND_REQUEST_ACTION_FRAME and
OID_WDI_TASK_P2P_SEND_RESPONSE_ACTION_FRAME - added additional validation of outgoing Point to
Point (P2P) action frames
Download the Windows Driver Kit (WDK)
11/23/2022 • 4 minutes to read • Edit Online

NOTE
Make sure to use Visual Studio 17.4.1 or newer. Specifically, driver debugging within Visual Studio does not work from
Visual Studio 17.2.0 up until 17.4.1. For more info, see WDK Known Issues.

The WDK is used to develop, test, and deploy drivers for Windows.
Learn what's new in driver development
Review known issues
Join the Windows Insider Program to get WDK Insider Preview builds. For installation instructions for the
Windows Insider Preview builds, see Installing preview versions of the Windows Driver Kit (WDK).
Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:
Visual Studio 2022 exclusively
Building and testing kernel-mode drivers for x64 and Arm64
Building and testing drivers for Windows 10, Windows Server 2016 and later client and server versions
Side by side (SxS) support with previous WDK/EWDK
Multiple WDKs and EWDKs can be installed concurrently on the same computer and even be part of same build
system. You can run the Windows 11, version 22H2 WDK on Windows 7 and later.
To target Windows 8.1, Windows 8, and Windows 7, install an older WDK and an older version of Visual Studio
either on the same machine or on a separate machine. For links to older kits, see Other WDK downloads.
Certain device-specific stacks (for example graphics) continue to have x86/ARM32 user-mode components to
support x86/ARM32 apps.
Starting with this release, WDF redistributable co-installers are no longer supported. To learn how to work
around this change, see WDK Known Issues.

Download and install the Windows 11, version 22H2 WDK

Step 1: Install Visual Studio 2022


The WDK requires Visual Studio. For more information about system requirements for Visual Studio, see Visual
Studio 2022 System Requirements.
The following editions of Visual Studio 2022 support driver development for this release:
Download Visual Studio Community 2022
Download Visual Studio Professional 2022
Download Visual Studio Enterprise 2022
When you install Visual Studio 2022, select the Desktop development with C++ workload. The Windows 11,
version 22H2 Software Development Kit (SDK) that is compatible with the Windows 11, version 22H2 WDK is
not included in Visual Studio. Please use the SDK download link in step 2 below.
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/Arm64EC 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 v143 - VS 2022 C++ x64/x86 build tools (Latest) .
With this information (Latest), go to Individual components and search for Latest . 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 Latest returns the following:

MSVC v143 - VS 2022 C++ Arm build tools (Latest)


MSVC v143 - VS 2022 C++ Arm Spectre-mitigated libs (Latest)
MSVC v143 - VS 2022 C++ Arm64 build tools (Latest)
MSVC v143 - VS 2022 C++ Arm64 Spectre-mitigated libs (Latest)
MSVC v143 - VS 2022 C++ Arm64EC build tools (Latest - experimental)
MSVC v143 - VS 2022 C++ Arm64EC Spectre-mitigated libs (Latest - experimental)
MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)

Step 2: Install Windows 11, version 22H2 SDK


Download Windows 11, version 22H2 SDK
This SDK must be installed separately until available through Visual Studio

Step 3: Install Windows 11, version 22H2 WDK


Download WDK for Windows 11, version 22H2
The WDK Visual Studio extension is included in the default WDK installation.

TIP
If you can't find driver project templates in Visual Studio, the WDK Visual Studio extension didn't install properly. To resolve
this, run the WDK.vsix file from this location: C:\Program Files (x86)\Windows
Kits\10\Vsix\VS2022\10.0.22621.382\WDK.vsix.

Enterprise WDK (EWDK)


The EWDK is a standalone, self-contained command-line environment for building drivers. It includes Visual
Studio Build Tools, the SDK, and the WDK. The latest public version of the EWDK contains Visual Studio 2022
Build Tools 17.1.5 and MSVC toolset v14.31. 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.

Windows 11, version 22H2 EWDK with Visual Studio Build Tools
Download the Windows 11, version 22H2 EWDK
You can use the Visual Studio interface with the build tools provided in the EWDK.
1. Mount the EWDK ISO.
2. Run LaunchBuildEnv.cmd .
3. In the environment created in step 2, type SetupVSEnv , and then press Enter .
4. Launch devenv.exe from the same environment, using the full file path. Example:
"C:\Program Files\Microsoft Visual
Studio\2022\%Community|Professional|Enterprise%\Common7\IDE\devenv.exe"

Note that the Visual Studio major version should match with the version in the EWDK. For example, Visual
Studio 2022 works with the EWDK that contain VS17.X build tools. For a list of Visual Studio 2022 version
numbers, see Visual Studio 2022 Releases.

Driver samples for Windows


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.

Related downloads
Download the WDK Insider Preview
Download previous versions of the WDK
Download the Windows Assessment and Deployment Kit (Windows ADK)
Download the Windows HLK
Download the Windows Debugging Tools (WinDbg)
Download Windows Symbol Packages

See also
Windows 11 hardware requirements
Installing preview versions of the Windows Driver
Kit (WDK)
11/23/2022 • 2 minutes to read • Edit Online

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.

Install Windows Driver Kit (WDK) Insider Preview


1. Install Visual Studio
The WDK now supports Visual Studio 2022. All editions are supported. The WDK no longer supports Visual
Studio 2019.
Download from Visual Studio 2022.
Select workload: Development with C++ .
For Arm64 and Arm64EC drivers, you must additionally install the component: Individual components ->
Compilers, build tools, and runtimes -> Visual C++ compilers and libraries for
Arm64/Arm64EC . Note that the 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.
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:

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,31bf3856ad364e35 /v TestPublicKey /t


REG_SZ /d
00240000048000009400000006020000002400005253413100040000010001003f8c902c8fe7ac83af7401b14c1bd103973b26dfafb2
b77eda478a2539b979b56ce47f36336741b4ec52bbc51fecd51ba23810cec47070f3e29a2261a2d1d08e4b2b4b457beaa91460055f78
cc89f21cd028377af0cc5e6c04699b6856a1e49d5fad3ef16d3c3d6010f40df0a7d6cc2ee11744b5cfb42e0f19a52b8a29dc31b0 /f

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,31bf3856ad364e35 /v


TestPublicKey /t REG_SZ /d
00240000048000009400000006020000002400005253413100040000010001003f8c902c8fe7ac83af7401b14c1bd103973b26dfafb2
b77eda478a2539b979b56ce47f36336741b4ec52bbc51fecd51ba23810cec47070f3e29a2261a2d1d08e4b2b4b457beaa91460055f78
cc89f21cd028377af0cc5e6c04699b6856a1e49d5fad3ef16d3c3d6010f40df0a7d6cc2ee11744b5cfb42e0f19a52b8a29dc31b0 /f

3. Install SDK Insider Preview


Get SDK Insider Preview
4. Install WDK Insider Preview
Get WDK Insider Preview

NOTE
During installation you will see the Visual Studio installer install the WDK Visual Studio Extensions.

Install Enterprise WDK (EWDK) Insider Preview


As an alternative to the above steps, the EWDK is a standalone self-contained command-line environment for
building drivers that includes Build Tools for Visual Studio 2022. See more at Installing the Enterprise WDK.
Get the Enterprise Windows Driver Kit (EWDK) Insider Preview
To get started, disable strong name validation by running the following commands from an elevated command
prompt:

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,31bf3856ad364e35 /v TestPublicKey /t


REG_SZ /d
00240000048000009400000006020000002400005253413100040000010001003f8c902c8fe7ac83af7401b14c1bd103973b26dfafb2
b77eda478a2539b979b56ce47f36336741b4ec52bbc51fecd51ba23810cec47070f3e29a2261a2d1d08e4b2b4b457beaa91460055f78
cc89f21cd028377af0cc5e6c04699b6856a1e49d5fad3ef16d3c3d6010f40df0a7d6cc2ee11744b5cfb42e0f19a52b8a29dc31b0 /f

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,31bf3856ad364e35 /v


TestPublicKey /t REG_SZ /d
00240000048000009400000006020000002400005253413100040000010001003f8c902c8fe7ac83af7401b14c1bd103973b26dfafb2
b77eda478a2539b979b56ce47f36336741b4ec52bbc51fecd51ba23810cec47070f3e29a2261a2d1d08e4b2b4b457beaa91460055f78
cc89f21cd028377af0cc5e6c04699b6856a1e49d5fad3ef16d3c3d6010f40df0a7d6cc2ee11744b5cfb42e0f19a52b8a29dc31b0 /f

Then mount the ISO that you downloaded from the Insider Preview page and select LaunchBuildEnv to use the
EWDK.
Other WDK downloads
11/23/2022 • 7 minutes to read • Edit Online

The Windows Driver Kit (WDK) is used to develop, test, and deploy Windows Drivers. This topic contains
information about earlier versions of the Windows Driver Kit (WDK), Enterprise WDK (EWDK), and additional
downloads for support purposes. To develop drivers, use the latest public versions of the Windows Driver Kit
(WDK) and tools, available for download on Download the Windows Driver Kit (WDK).
To use these earlier versions, you must first install the version of Visual Studio that is appropriate for your
targeted platform.

Runtime requirements
You can run the Windows 10 WDK versions (including the WDK for Windows Server 2022) on Windows 7 and
later, to develop drivers for the following operating systems:

C L IEN T O S SERVER O S

Windows 11, version 21H2 Windows Server 2022

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

Step 1: Install Visual Studio


The WDK requires Visual Studio. For more information about system requirements for Visual Studio, see Visual
Studio 2019 System Requirements.

NOTE
Visual Studio 2022 is not supported by the Windows 11, version 21H2 WDK. To use Visual Studio 2022 to develop and
test drivers, download the Windows 11, version 22H2 WDK. For details, see Download the Windows Driver Kit (WDK).

The following table indicates which Visual Studio version is required for the different releases of the WDK.

TA RGET ED VERSIO N S O F W IN DO W S EDIT IO N ( S) O F VISUA L ST UDIO

Windows 11, version 21H2 Visual Studio Community 2019


Windows Server 2022 Visual Studio Professional 2019
Windows 10, version 2004 Visual Studio Enterprise 2019
Windows 10, version 1903

Windows 10, version 1809 Visual Studio Community 2017


Windows 10, version 1803 Visual Studio Professional 2017
Windows 10, version 1709 Visual Studio Enterprise 2017
TA RGET ED VERSIO N S O F W IN DO W S EDIT IO N ( S) O F VISUA L ST UDIO

Windows 10, version 1703 Visual Studio Express 2015 for Desktop
Windows 10, version 1607 Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015

Windows 8.1 Update Visual Studio 2013


Windows 8.1

Windows 8 Visual Studio Professional 2012


Visual Studio Ultimate 2012

Configure Visual Studio for Windows 11, version 21H2 and Windows 10, versions 1709, 1803, 1809, 1903, 2004,
and Windows Server 2022
When you install Visual Studio, select the Desktop development with C++ workload. The Windows 10
Software Development Kit (SDK) is automatically included and is displayed in the right-hand Summar y pane.
To develop drivers for Arm/Arm64, choose Individual components and under Compilers, build tools, and
runtimes select Visual C++ compilers and libraries for Arm/Arm64 .
Install the Windows SDK to target Windows 10, versions 1607 and 1703
If your development targets systems that run Windows 10, version 1607 or Windows 10, version 1703, you
should install Visual Studio 2015, and then also download and install the version of the Windows SDK for the
targeted version of Windows 10, as identified in the following table.

TA RGET ED VERSIO N S O F W IN DO W S VERSIO N O F W IN DO W S SDK

Windows 10, version 1703 Windows SDK for Windows 10.0.15063.468

Windows 10, version 1607 Windows SDK for Windows 10.0.14393.795

Windows 8.1 Windows SDK for Windows 8.1

Windows 8 Windows SDK for Windows 8

The Windows SDK was not included in Visual Studio 2015, so you must install the SDK separately. Later versions
of Visual Studio include the Windows SDK.

Step 2: Install the WDK


The WDK is integrated with Visual Studio and Debugging Tools for Windows (WinDbg). This integrated
environment gives you the tools you need to develop, build, package, deploy, test, and debug drivers.

NOTE
Starting with Windows 10, version 1709, installing the WDK will by default install the WDK extensions for Visual Studio.
These extensions are required for integration of the WDK with Visual Studio.

TA RGET ED VERSIO N S O F W IN DO W S W DK A N D REL AT ED DO W N LO A DS

Windows 11, version 22H2 Download the Windows Driver Kit (WDK)
TA RGET ED VERSIO N S O F W IN DO W S W DK A N D REL AT ED DO W N LO A DS

Windows 11, version 21H2 Windows 11, version 21H2 WDK

Windows Server 2022 WDK for Windows Server 2022

Windows 10, version 22H2 WDK for Windows 10, version 2004
Windows 10, version 21H2
Windows 10, version 21H1
Windows 10, version 20H2
Windows 10, version 2004

Windows 10, version 1909 WDK for Windows 10, version 1903
Windows 10, version 1903

Windows 10, version 1809 WDK for Windows 10, version 1809
Windows Server 2019

Windows 10, version 1803 WDK for Windows 10, version 1803

Windows 10, version 1709 WDK for Windows 10, version 1709

Windows 10, version 1703 WDK for Windows 10, version 1703

Windows 10, version 1607 WDK for Windows 10, version 1607
Windows 10, version 1511
Windows 10, version 1507
Windows Server 2016

Windows 8.1 Update WDK 8.1 Update (English only) - temporarily unavailable
WDK 8.1 Update Test Pack (English only) - temporarily
unavailable
WDK 8.1 Samples

Windows 8 WDK 8 (English only)


WDK 8 redistributable components (English only)
WDK 8 Samples

Windows 7 WDK 7.1.0

NOTE
Please review Hardware development kits for Windows 10, Version 2004 (10.19041.1), which addresses a bug with
ExAllocatePoolZero.

IMPORTANT
If you have installed the WDK for Windows 10, version 1703 on a system that had the WDK for Windows 10, version
1607 installed, some files from the earlier version of the WDK might have been removed. To restore these files:
1. On the Start menu, enter Apps & features in the search box, and select Apps & features from the results.
2. Find Windows Driver Kit - Windows 10.0.15063.0 in the list of Apps & Features , and then select the program.
3. Select Modify , select Repair , and then follow the directions on the screen.
4. The files will be restored.
Download previous versions of the EWDK
The Enterprise WDK (EWDK) is a standalone, self-contained, command-line environment for building drivers and
basic Win32 test applications. It includes the Visual Studio Build Tools, the SDK, and the WDK. This environment
doesn't include all the features available in Visual Studio, such as the integrated development environment (IDE).
Using the EWDK requires .NET Framework 4.6.1. For more information about which systems run this version of
the framework, see .NET Framework system requirements. For links to download the .NET Framework, see
Install the .NET Framework for developers.
For more information about the EWDK, see Using the Enterprise WDK.

VERSIO N S O F W IN DO W S EW DK

Windows 11, version 21H2 Windows 11, version 21H2 EWDK

Windows Server 2022 EWDK for Windows Windows Server 2022

Windows 10, version 2004 EWDK for Windows 10, version 2004

Windows 10, version 1903 EWDK for Windows 10, version 1903

Windows 10, version 1809 EWDK for Windows 10, version 1809

Windows 10, version 1803 EWDK for Windows 10, version 1803

Windows 10, version 1709 EWDK for Visual Studio with Build Tools 15.6 (Recommended)
EWDK for Visual Studio with Build Tools 15.4
EWDK for Visual Studio with Build Tools 15.2

Windows 10, version 1703 EWDK for Windows 10, version 1703

NOTE
Starting in Windows 10 version 1709, the EWDK is ISO-based. To get started, download and mount the ISO, and then run
LaunchBuildEnv .

Optional: Install updated test certificates for HAL extensions


To work with HAL Extensions, prepare your development system, running Windows 10, version 1709 or a later
version of Windows 10. Also install the WDK or the EWDK, and then install the updated version of the Windows
OEM HAL Extension Test Cer t 2017 (TEST ONLY) , available for download as a ZIP file:
HAL_Extension_Test_Cert_2017.zip.
For more information about using this updated certificate, see Update for "Windows OEM HAL Extension Test
Cert 2017 (TEST ONLY)" test certificate on Windows Support.

Optional: Install WinDbg Preview


WinDbg Preview is a new version of WinDbg with more modern visuals, faster windows, a full-fledged scripting
experience, built with the extensible debugger data model front and center. WinDbg Preview supports
debugging every version of Windows 10.
For download links and more information about WinDbg Preview, see Download WinDbg Preview.
Standalone tools for debugging Windows XP and Windows Vista
If you're debugging Windows XP, Windows Server 2003, Windows Vista, or Windows Server 2008 (or using one
of these operating systems to run Debugging Tools for Windows), you need to use the Windows 7 release of the
debugging tools. It's included in the SDK for Windows 7 and .NET Framework 4.0.

IMPORTANT
Newer versions of the Visual C++ 2010 Redistributable can cause issues when you install the SDK for Windows 7.

Get the standalone debugging tools for Windows XP by first downloading the Windows 7 SDK: Microsoft
Windows SDK for Windows 7 and .NET Framework 4.
To install the Debugging Tools for Windows as a standalone component, start the SDK installer, and in the
installation wizard, select Debugging Tools for Windows , and clear all other components.
Related downloads
Download the Windows Assessment and Deployment Kit (Windows ADK)
Download the Windows HLK, HCK, or Logo Kit
Download the debugging Tools for Windows (WinDbg)
Download Windows Symbol Packages
Download the WDK Insider Preview
Windows Driver Kit (WDK) known issues
11/23/2022 • 7 minutes to read • Edit Online

This topic details known issues concerning the WDK.

WDK for Windows 11, version 22H2


Service error at startup
If you installed the original Windows 11, version 22H2 WDK between May and August 2022 (version
10.0.22621.1), you may see the following error message when you start Visual Studio with the WDK.
The service Microsoft.VisualStudio.Shell.Interop.SVsUIShell must be installed for this feature to work. Ensure
that this service is available.
You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the latest WDK using
the instructions in Download the Windows Driver Kit.
Debugger within Visual Studio doesn't work
It is not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version
17.2.0 and 17.3 with the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the
problem, do one of the following: update Visual Studio to 17.4.1 or later, debug with WinDbg, or use a version of
Visual Studio earlier than 17.2.0. The following error message is related to this issue:
The
Microsoft.Windows.Tools.WinIDE.Debugger.DebuggerPackage, DebuggerPackage, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=null
package did not load correctly.
WDF redistributable co -installers don't work
Starting with this release, WDF redistributable co-installers are no longer supported. Specifically, on a computer
that has both the Windows 11, version 22H2 WDK and an older WDK, when building a WDF 1.11 driver, msbuild
fails because it cannot find the WDF coinstaller.
To fix this problem, before installing Windows 11, version 22H2 WDK, back up the folder
\Program files (x86)\windows kit\10\redist\wdf and restore it afterwards. Alternatively, if you have already
installed the Windows 11, version 22H2 WDK, install the MSI file at WDK 8 redistributable components on a
separate computer and copy the redist folder to the above folder. For more information, see Redistributable
Framework Components.

WDK for Windows 10, version 2004


Issue in ExAllocatePoolZero, ExAllocatePoolQuotaZero, and ExAllocatePoolPriorityZero functions FIXED
In May 2020, OSR discovered that the new down-level support for automatic zeroing of pool allocations had an
issue that could lead to an allocation not getting zero-initialized on systems running Windows 10, version 1909.
This has now been fixed with a security refresh of the WDK for Windows 10, version 2004 and the Enterprise
WDK (EWDK) for Windows 10, version 2004 on Dec 16th. Microsoft took advantage of the security refresh and
updated the EWDK to include the Visual Studio build tools 16.7. Microsoft recommends all driver developers
uninstall the original SDK and WDK (version 2004) and install the refresh SDK and WDK or EWDK.
To ensure there was a complete security solution in place, an OS fix was released for Windows 10, version 1909
in November, so if there was a driver created with the security issue the OS would be protected from it.
In addition to downloading the updated WDK/EWDK, Microsoft recommends that all drivers switch all kernel
allocations to use the new pool zeroing DDIs which return zeroed memory by default. This will increase driver
security and reliability. In order to help with this transition, Microsoft has created a Static Driver Verifier rule
which is available in preview Windows 10 WDK versions 20236 and above. The rule will identify all instances in
a driver’s source code where the old pool allocation DDIs are being used and will recommend replacing them
with the new, safer equivalent DDI. The rule is applicable to WDM, WDF and NDIS based drivers.
Installing WDK no longer enables Spectre mitigations for all C++ projects as seen in WDK 1903
While the WDK install will enable Spectre mitigation by default for all drivers, it no longer enables them for all
C++ projects.
Error ‘A WDK corresponding to target ’10.0.19041.0’ was not found.’
When selecting [Windows SDK Version] to '10.0 (latest installed version)' with WDK 10.0.19041.0 causes the "A
WDK corresponding to target version '10.0.19041.0' was not found" error even if the SDK version is installed.
Workaround: In the properties page for the driver project (Configuration Properties >General) set Windows
SDK Version to $(LatestTargetPlatformVersion). If this option is not available to select then select the option
inherit from parent or project default .
EWDK and SDV running on Server have .NET requirements
Running Static Driver Verifier from the EWDK requires .Net Framework 4.7.2. Depending on the version of
Windows on your system, .NET may be installed, may be installed but need to be enabled, or may not be
installed. For more information about what version of .NET is installed or the state of .NET installation please
review .NET Framework versions and dependencies.
DVL generation fails with System.IO.FileNotFoundException
When attempting to create a Driver Verification Log (DVL), the following error will be presented:

Unhandled Exception: System.IO.FileNotFoundException:


Could not load file or assembly
'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
or one of its dependencies.
The system cannot find the file specified.

This can occur in both the command-line and GUI environments. This issue is resolved in a future version of the
WDK and can be seen in the Windows Insider Preview WDK. Unfortunately, no workaround exists for the current
version.
SDV fails in the EWDK if VS is not installed
SDV has a dependency on VCRUNTIME140D.dll as part of Visual Studio. As such, running the EWDK on a
machine without VS installed will fail. Install Visual Studio on the machine to work around this issue.
Driver Verifier does not get enabled/disabled when using WDK test explorer
Driver Verifier does not get enabled/disabled when Device Fundamental tests are run using the WDK Test
Explorer.
Workaround: On the client machine manually enable/disable driver verifier per these instructions.
WDK Side by Side installations of Windows 10, version 2004 and WDK Windows 10, version 1903 or version
1803
With both versions of kits installed on the same PC the ‘Deploy driver’ feature won’t work for older version.
Workaround: Use 1803 on a separate machine if Deploy driver feature is needed.
Windows Device Testing Framework (WDTF ) tests now only run on systems with matching Windows 10
versions as the WDK
In WDK for Windows 10, version 1809, changes were made to WDTF in order to support this version of
Windows 10, version 1809. The effect of this is that WDTF will no longer run on down-level OS. The change
continues with WDK for Windows 10, version 2004.
Alterative for down-level testing
The WDTF tests in WDK for Windows 10, version 1803 can be run on previous Windows versions.
APIValidator
On an x86 arch machine APIValidator is unable to run against x64 binaries. If building x64 drivers on an x86
machine APIValidator should be turned off.
Workaround:
1. Go to the properties page of the driver solution.
2. Select APIValidator , then General , and then change Run ApiValidator from Yes to No .
WDK running on Windows 7 systems requires KB 3033929
You must install Microsoft Security Advisory 3033929 (KB3033929) prior to installing the WDK on systems
running Windows 7. KB3033929 can be downloaded from the Microsoft Download Center.
Installing the WDK generates an error from Visual Studio that the add-in component is already installed
This error message can be seen if the WDK was uninstalled but the WDK drivers extension for Visual Studio was
not uninstalled.
Resolution: In Visual Studio, go to the Extension dropdown menu, choose Manage Extensions , select the
Windows Driver Kit , and then click Uninstall .

FAQ
How do I tell if the WDK or EWDK versions I have contains the fix for the zeroing of pool allocations?
In System Settings go to Add or Remove programs , search for Windows Driver Kit and note the version.
The original WDK for Windows 10, version 2004 has a version of 10.0.19041.1, the refreshed WDK version is
10.0.19041.685 For the EWDK, once the EWDK environment is launched, look at the title of the command
window. The refreshed version will contain vb_release_svc_prod1.19041.685 . Additionally, when looking at
the environment variables, the BuildLab variable should show vb_release_svc_prod1.19041.685 .
The Windows Software Development Kit (SDK ) was also refreshed, is this needed as well?
No, however the refreshed Windows Software Development Kit (SDK) contains a fix for onecore.lib that may be
nice to have. Also, it’s generally a good idea to keep the SDK and WDK aligned.
If I already have the WDK for Windows 10, version 2004 installed, do I need to uninstall it before installing the
refreshed version?
It is highly recommended that if you have the original 2004 SDK and WDK that these be uninstalled and the
security refresh SDK and WDK be installed. That said if the refreshed WDK is installed on top of the original WDK
the refreshed version will overwrite the original. Note: In this scenario “Add or remove programs”, both versions
will be listed.
Bring up guide
11/23/2022 • 2 minutes to read • Edit Online

This section of the partner documentation is designed for hardware engineers and developers who need to
understand how to get started with bringing up hardware on Windows.

In this section
TO P IC DESC RIP T IO N

Firmware Attack Surface Reduction (FASR) Provides information about how to achieve Secured-core PC
compliance with Firmware Attack Surface Reduction (FASR).

Boot and UEFI Provides guidance about the boot process and UEFI
implementation requirements for devices that run
Windows 10 and Windows Server 2016.

Windows ACPI design guide for SoC platforms The Advanced Configuration and Power Interface
Specification, Revision 5.0 (ACPI 5.0 specification, defines a
new set of features to support low-power, mobile devices
that are based on System on a Chip (SoC) integrated circuits
and that implement the connected standby power model.
Starting with Windows 8 and Windows 8.1, and Windows
Server 2012 and 2012 R2, Windows supports the new ACPI
5.0 features for SoC-based platforms.

Security Use the topics in this section to learn more about security in
Windows 10 Mobile and Windows Server 2016.

Windows 10 Mobile partition layout Learn how to configure storage partitions and partitions
sizes on Windows 10 Mobile devices.
Developing, Testing, and Deploying Drivers
11/23/2022 • 2 minutes to read • Edit Online

The Windows driver development environment and the Windows debuggers are integrated into Microsoft
Visual Studio. In this integrated driver development environment, most of the tools you need for coding,
building, packaging, deploying, and testing a driver are available in the Visual Studio user interface.
To set up the integrated development environment, first install Visual Studio and then install the WDK. You can
find information about how to get Visual Studio and the WDK on the WDK setup and download page. The
Debugging Tools for Windows are included with the WDK installation.
The WDK uses MSBuild.exe, which is available both in the Visual Studio user interface and as a command-line
tool. Drivers created in the Visual Studio environment use Project and Solution files to describe a project or
group of projects. The Visual Studio environment provides a tool for converting legacy Sources and Dirs files to
Project and Solution files.
The Visual Studio environment provides templates for:
New drivers
Driver packages
New tests
Enhancement of existing tests
Custom driver deployment scripts
In the Visual Studio environment, you can configure the build process so that it automatically creates and signs a
driver package. Static and run-time analysis tools are available in Visual Studio. You can configure a target
computer for testing your driver and automatically deploy your driver to the target computer each time you
rebuild. You can choose from an extensive set of run-time tests, and you can write your own tests.
The topics in this section show you how to use Visual Studio to perform several of the tasks involved in driver
development, deployment, and testing.

Additional Videos
You'll find videos on the following pages in the Windows driver docs:
Using the Windows Performance Toolkit (WPT) with WDF
Video: Accessing driver IFR logs without a debugger
Video: Debugging your driver with WDF source code
Videos: Debugging UMDF Drivers
Device and Driver Installation
11/23/2022 • 2 minutes to read • Edit Online

This section explains how devices and drivers are installed in Windows.
If you are unfamiliar with the device and driver installation process, we recommend that you start by reviewing
Roadmap for Device and Driver Installation. You may also want to read Overview of Device and Driver
Installation for a high-level overview of this process and its components.
Kernel-Mode Driver Architecture Design Guide
11/23/2022 • 3 minutes to read • Edit Online

NOTE
For information about programming interfaces that your driver can implement or call, see the Kernel-Mode Driver
Reference.

This section includes general concepts to help you understand kernel-mode programming and describes
specific techniques of kernel programming. For a general overview of Windows Drivers, see Getting Started
with Windows Drivers, which provides a general overview of Windows components, lists the types of device
drivers used in Windows, discusses the goals of Windows device drivers, and discusses generic sample device
drivers included in the kit.
This section contains conceptual information that describes and helps you build kernel-mode drivers.
An Over view containing:
An overview of Windows Components
Design Goals for Kernel-Mode Drivers
A catalogue of Sample Kernel-Mode Drivers
Kernel Driver Development Best Practices, as compiled by the Microsoft Surface team
Kernel-Mode Components describes the primary kernel-mode managers and components of the
Windows operating system.

C O M P O N EN T DESC RIP T IO N

Managers

Windows Kernel-Mode Object Manager Manages objects: files, devices, synchronization


mechanisms, registry keys, and so on.

Windows Kernel-Mode Memory Manager Manages physical memory for the operating system.

Windows Kernel-Mode Process and Thread Manager Handles the execution of all threads in a process.

Windows Kernel-Mode I/O Manager Manages the communication between applications and
the interfaces provided by device drivers.

Windows Kernel-Mode Plug and Play Manager A subsystem of the I/O manager, the Plug and Play (PnP)
Manager enables a PC to recognize when a device is
added to the system.

Windows Kernel-Mode Power Manager Manages the orderly change in power status for all
devices that support power state changes.

Windows Kernel-Mode Configuration Manager Manages the registry, such as monitoring changes in the
registry or registering callbacks on specific registry data.

Windows Kernel-Mode Kernel Transaction Manager Implements transaction processing in kernel mode.
C O M P O N EN T DESC RIP T IO N

Windows Kernel-Mode Security Reference Monitor Provides routines for your driver to work with access
control.

Libraries

Windows Kernel-Mode Kernel Library Implements the core functionality that everything else in
the operating system depends upon. The Microsoft
Windows kernel provides basic low-level operations such
as scheduling threads or routing hardware interrupts.

Windows Kernel-Mode Executive Support Library Refers to kernel-mode components that provide a
variety of services to device drivers, including: object
management, memory management, process and thread
management, input/output management, and
configuration management.

Windows Kernel-Mode Run-Time Library A set of common utility routines needed by various
kernel-mode components.

Windows Kernel-Mode Safe String Library A safe string library to provide greater security in kernel-
mode development.

Windows Kernel-Mode DMA Library A direct memory access (DMA) library for device driver
developers.

Windows Kernel-Mode HAL Library A hardware abstraction layer (HAL) for kernel-mode
driver development.

Windows Kernel-Mode CLFS Library A transactional logging system, the Common Log File
System (CLFS).

Windows Kernel-Mode WMI Library A general mechanism for managing components, called
Windows Management Instrumentation (WMI).

Writing WDM Drivers and Introduction to WDM provide information needed to write drivers using the
Windows Driver Model (WDM).
Device Objects and the other topics in Device Objects and Device Stacks describe how the
operating system represents devices by device objects.
Memor y Management for Windows Drivers illustrates how kernel-mode drivers allocate memory
for purposes such as storing internal data, buffering data during I/O operations, and sharing memory
with other kernel-mode and user-mode components.
Security From Controlling Device Access and Privileges to SDDL for Device objects, ensure that your
drivers are as secure as possible.
Handling IRPs describes how kernel-mode drivers handle I/O request packets (IRPs).
DMA Direct Memory Access (DMA) is a critical aspect of driver development, and the topics in this node
cover DMA from A to Z.
Controller Objects represent a physical device controller with attached devices.
Interrupt Ser vice Routines (ISRs) handle interrupts for drivers of a physical device that receives
interrupts.
Message-Signaled Interrupts trigger an interrupt by writing a value to a particular memory address.
Deferred Procedure Calls (DPC Objects) can be queued from ISRs and are executed at a later time
and at a lower IRQL than the ISR.
Plug and Play (PnP) focuses on the system software support for PnP and how drivers use that support
to implement PnP.
Power Management describes the architecture that provides a comprehensive approach to system and
device power management.
Windows Management Instrumentation (WMI) are extensions to your kernel-mode driver, which
enable your driver to become a WMI provider. A WMI provider makes measurement and instrumentation
data available to WMI consumers, such as user-mode applications.
Driver Programming Techniques Programming drivers in the kernel mode of Windows requires
techniques that sometimes differ significantly from those of ordinary user-mode programming.
What's New for WDF Drivers in Windows 10
11/23/2022 • 6 minutes to read • Edit Online

This topic summarizes the new features and improvements for Windows Driver Frameworks (WDF) drivers in
Windows 10.
Windows Server 2022 includes Kernel-Mode Driver Framework (KMDF) version 1.33 and User-Mode Driver
Framework (UMDF) version 2.33.
You can use these framework versions to build drivers for:
Windows 10 (all SKUs)
Windows Server 2022
For version history, see KMDF Version History and UMDF Version History. Except where noted, UMDF references
on this page describe version 2 functionality that is not available in UMDF version 1.

New in WDF for Windows Server 2022


See KMDF Version History and UMDF Version History.

New in WDF for Windows 10, version 2004


See KMDF Version History and UMDF Version History.

New in WDF for Windows 10, version 1903


No functionality added or changed.

New in WDF for Windows 10, version 1809


Added new API WdfDriverRetrieveDriverDataDirector yString

New in WDF for Windows 10, version 1803


Building a WDF driver for multiple versions of Windows.
WdfDeviceRetrieveDeviceDirector yString

New in WDF for Windows 10, version 1709


See KMDF Version History and UMDF Version History.

New in WDF for Windows 10, version 1703


In Windows 10, version 1703, WDF includes the following enhancements:
New WDF Verifier settings to detect excessive object creation
In some cases, framework objects are incorrectly parented and not deleted after use. With this feature,
you can specify a maximum number of objects and what should happen when this threshold is exceeded.
To start monitoring, add the following registry values under:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\<driver service>\Parameters\wdf

1. Add a DWORD value named ObjectLeakDetectionLimit with the threshold value. This is the
maximum number of objects of the types described in the ObjectsForLeakDetection key.
2. Add a new REG_MULTI_SZ value named ObjectsForLeakDetection that lists each type name to
verify. For example, you could specify WDFDMATRANSACTION WDFDEVICE . To specify all handle types, use
* as the string.

3. To control whether exceeding this threshold should cause a debug break or a bugcheck, set the
DbgBreakOnError key.
By default, if the ObjectsForLeakDetection key is not specified, the framework monitors
WDFREQUEST, WDFWORKITEM, WDFKEY, WDFSTRING, WDFOBJECT, and WDFDEVICE.
The limit scales with the number of devices installed, so if the driver creates three WDFDEVICE
objects, the WDF Verifier limit is three times the value specified in ObjectLeakDetectionLimit .
If you specify WDFREQUEST, the verifier only counts WDFREQUEST objects that the driver creates.
This feature does not currently support tracking the WDFMEMORY object type.
SleepStudy tool provides info on KMDF drivers
The SleepStudy software tool reports the number of power references that a KMDF driver has that are
preventing the system from going to sleep. For more info, see Modern standby SleepStudy.
The rest of this page describes functionality that was added in Windows 10, version 1507.

WDF source code is publicly available


The WDF source code is now available as open source on GitHub. This is the same source code from
which the WDF runtime library that ships in Windows 10 is built. You can debug your driver more
effectively when you can follow the interactions between the driver and WDF. Download it from
https://github.com/Microsoft/Windows-Driver-Frameworks.
The private symbol files for WDF on Windows 10 are now available through the Microsoft Symbol Server.
The Windows Driver Kit (WDK) 10 samples are also now published to GitHub. Download them from
https://github.com/Microsoft/Windows-Driver-Samples.

Automatic Source Level Debugging of Framework Code


When you use WinDbg to debug a WDF driver on Windows 10, WinDbg automatically retrieves the framework
source code from Microsoft's public GitHub repository. You can use this feature to step through the WDF source
code while debugging, and to learn about framework internals without downloading the source code to a local
machine. For more information, see Debugging with WDF Source and Video: Debugging your driver with WDF
source code.

Universal Driver Compliance


All WDF driver samples and Visual Studio driver templates are Universal Windows driver compliant.
All KMDF and UMDF 2 functionality is Universal Windows driver compliant.
Note that UMDF 1 drivers run only on Windows 10 for desktop editions and earlier versions of desktop
Windows. Want to benefit from the universal capabilities of UMDF 2? To learn how to port your old UMDF 1
driver, see Porting a Driver from UMDF 1 to UMDF 2.
Debugging and Diagnosability
All KMDF and UMDF 2 drivers can use an always on, always available Inflight Trace Recorder (IFR). When
a driver provides a custom trace, the driver IFR log contains the trace messages. Note that the new driver
IFR log is separate from the framework IFR log that WDF creates for each driver.
It's easy to turn on the IFR. See Inflight Trace Recorder (IFR) for logging traces and Using Inflight Trace
Recorder in KMDF and UMDF Drivers.
The IFR maintains a circular buffer of WPP traces in non-pageable memory. If a driver crashes, the logs
are frequently included in the crash dump file.
If you turn on the IFR in your driver binary, the IFR is present and running during the lifetime of your
driver. You don't need to start an explicit trace collection session.
IFR logs are included in minidump files except when the responsible driver is undetermined or if
the crash was a host timeout.
If you have a debugger connected, you can access both the driver and framework IFR logs by
issuing !wdfkd.wdflogdump .
If you do not have a debugger connected, you can still access both logs. To learn how, see Video:
Accessing driver IFR logs without a debugger.
When debugging a UMDF driver, you can merge framework logs with driver logs by issuing:
!wdfkd.wdflogdump <drivername.dll> -m
UMDF logs (WudfTrace.etl) and dumps are now located in %ProgramData%\Microsoft\WDF instead of
%systemDrive%\LogFiles\Wudf.
New debugger command: !wdfkd.wdfumtriage provides a kernel-centric view of all UMDF devices on
the system.
You can run !analyze to investigate UMDF verifier failures or UMDF unhandled exceptions. This works
for live kernel debugging as well as debugging user crash dump files from
%ProgramData%\Microsoft\WDF.
In KMDF and UMDF 2, you can monitor power reference usage in the debugger. For info, see Debugging
Power Reference Leaks in WDF.
You can use !wdfkd.wdfcrashdump to display error information about UMDF 2 drivers. For more
information, see !wdfkd.wdfcrashdump .

Performance Tracing tool for WDF drivers


You can use the Windows Performance Toolkit (WPT) to view performance data for a given KMDF or UMDF 2
driver. When tracing is enabled, the framework generates ETW events for I/O, PnP, and Power callback paths. You
can then view graphs in the Windows Performance Analyzer (WPA) that show I/O throughput rates, CPU
utilization, and callback performance. The WPT is included in the Windows Assessment and Deployment Kit
(ADK).
For more information, see Using the Windows Performance Toolkit (WPT) with WDF.

Additional support for HID drivers in UMDF


UMDF now fully supports HID filters (enumerated by HIDClass) and minidrivers. Simply port your
existing KMDF driver or write a new UMDF 2 filter; the functionality is automatically enabled.
UMDF HID minidrivers that are enumerated by ACPI can perform selective suspend. For more
information, see Creating WDF HID Minidrivers.
UMDF drivers can now be installed in the HID stack for low latency input devices such as touch and
mouse. A driver for an input device should specify the UmdfHostPriority INF directive. For information,
see Specifying WDF Directives in INF Files.

Support for interrupts for GPIO-backed devices


UMDF 2 supports interrupts for GPIO-backed devices like hardware push-buttons. KMDF supports these
devices natively, without the workaround described in Handling Active-Both Interrupts. For more
information, see Creating an Interrupt Object.

UMDF no longer requires WinUSB


New support has been added for USB drivers in UMDF. A UMDF 2 USB driver no longer uses WinUSB. To use the
new functionality, the driver sets the UmdfDispatcher directive to NativeUSB , instead of WinUSB . See
Specifying WDF Directives in INF Files.

Improved Performance
UMDF system components consume less disk space.
KMDF and UMDF drivers use less non-paged memory.
Improved framework version checking reduces header/library mismatches.
UMDF provides improved buffer mapping for HID transfers.
Driver Security Guidance
11/23/2022 • 2 minutes to read • Edit Online

This section contains information on enhancing driver security.

In this section
TO P IC DESC RIP T IO N

Driver security checklist This topic provides a driver security checklist for driver
developers.

Threat modeling for drivers Driver writers and architects should make threat
modeling an integral part of the design process for any
driver. This topic provides guidelines for creating threat
models for drivers.

Windows security model for driver developers This topic describes how the Windows security model
applies to drivers and explains what driver writers must
do to improve the security of their devices.

Evaluate HVCI driver compatibility This topic describes how to implement Hypervisor-
protected Code Integrity (HVCI) compatible code.

Development security practices for Windows driver This topic describes how to write secure code for
developers Windows drivers to prevent abuse and tampering by
malicious actors.
Debugging Tools for Windows (WinDbg, KD, CDB,
NTSD)
11/23/2022 • 3 minutes to read • Edit Online

Start here for an overview of Debugging Tools for Windows. This tool set includes WinDbg and other
debuggers.

Install Debugging Tools for Windows


You can get Debugging Tools for Windows as part of a development kit or as a standalone tool set:
As par t of the WDK
Debugging Tools for Windows is included in the Windows Driver Kit (WDK). To get the WDK, see
Download the Windows Driver Kit (WDK).
As par t of the Windows SDK
Debugging Tools for Windows is included in the Windows Software Development Kit (SDK). To download
the installer or an ISO image, see Windows SDK on Windows Dev Center.
As a standalone tool set
You can install the Debugging Tools for Windows alone, without the Windows SDK or WDK, by starting
installation of the Windows SDK and then selecting only Debugging Tools for Windows in the list of
features to install (and clearing the selection of all other features). To download the installer or an ISO
image, see Windows SDK on Windows Dev Center.

Get started with Windows Debugging


To get started with Windows debugging, see Getting Started with Windows Debugging.
To get started with debugging kernel-mode drivers, see Debug Universal Drivers - Step by Step Lab (Echo
Kernel-Mode). This is a step-by-step lab that shows how to use WinDbg to debug Echo, a sample driver that
uses the Kernel-Mode Driver Framework (KMDF).

Debugging environments
If your computer has Visual Studio and the WDK installed, then you have six available debugging environments.
For descriptions of these environments, see Debugging Environments.
All of these debugging environments provide user interfaces for the same underlying debugging engine, which
is implemented in the Windows Symbolic Debugger Engine (Dbgeng.dll). This debugging engine is also called
the Windows debugger, and the six debugging environments are collectively called the Windows debuggers.

NOTE
Visual Studio includes its own debugging environment and debugging engine, which together are called the Visual Studio
debugger. For information on debugging in Visual Studio, see Debugging in Visual Studio. For debugging managed code,
such as C#, using the Visual Studio debugger is often the easiest way to get started.
Windows debuggers
The Windows debuggers can run on x86-based, x64-based, or Arm-based processors, and they can debug code
that is running on those same architectures. Sometimes the debugger and the code being debugged run on the
same computer, but other times the debugger and the code being debugged run on separate computers. In
either case, the computer that is running the debugger is called the host computer, and the computer that is
being debugged is called the target computer. The Windows debuggers support the following versions of
Windows for both the host and target computers.
Windows 11 and Windows Server 2022
Windows 10 and Windows Server 2016
Windows 8.1 and Windows Server 2012 R2
Windows 8 and Windows Server 2012

Symbols and symbol files


Symbol files store a variety of data that are not required when running the executable binaries, but symbol files
are very useful when debugging code. For more information about creating and using symbol files, see Symbols
for Windows debugging (WinDbg, KD, CDB, NTSD).

Blue screens and crash dump files


If Windows stops working and displays a blue screen, the computer has shut down abruptly to protect itself
from data loss and displays a bug check code. For more information, see Bug Checks (Blue Screens). You analyze
crash dump files that are created when Windows shuts down by using WinDbg and other Windows debuggers.
For more information, see Crash dump analysis using the Windows debuggers (WinDbg).

Tools and utilities


In addition to the debuggers, Debugging Tools for Windows includes a set of tools that are useful for debugging.
For a full list of the tools, see Tools Included in Debugging Tools for Windows.

Additional documentation
For additional information related to Debugging Tools for Windows, see Debugging Resources. For information
on what's new in the debugger, see WinDbg Preview - What's New.
UWP device apps
11/23/2022 • 2 minutes to read • Edit Online

Device manufacturers can create a UWP device app that serves as a companion to their device. UWP device
apps have more capabilities than regular UWP apps and can perform privileged operations, such as firmware
updates. Also, UWP device apps can start from AutoPlay (on more devices than other apps can), automatically
install the first time a device is connected, and extend the printer and camera experiences built into Windows 8.1
and Windows 10.
This section describes what UWP device apps are and how device manufacturers can create them. If you're new
to UWP device apps, take a look at Getting started.
If you're looking for information about UWP mobile broadband apps, see Mobile Broadband.

In this section
TO P IC DESC RIP T IO N

What's new This section provides a glimpse of what's new for UWP
device apps.

Getting started Start here to begin building UWP device apps.

Build a UWP device app step-by-step This step-by-step guide describes in detail how to build a
UWP device app with Microsoft Visual Studio and the Device
Metadata Authoring Wizard.

AutoPlay for UWP device apps This topic describes how to use the Device Metadata
Authoring Wizard to enable AutoPlay. It also describes how
to handle AutoPlay activations in your app.

Device sync and update for UWP device apps In Windows 8.1, your UWP app can use a device background
task to synchronize data on your peripheral device. If your
app is associated with device metadata, that UWP device
app can also use a device background agent to perform
device updates, such as firmware updates.

Print support app design guide Provides guidance and examples for printer OEMs and IHVs
that are implementing a print support app (PSA) for their
device.

Print support app association Provides guidance and examples for associating a print
support app (PSA) with a printer.

UWP device apps for printers This section introduces UWP device apps for printers.

UWP device apps for cameras This section introduces UWP device apps for cameras.

UWP device apps for internal devices This topic introduces the ways that UWP device apps can
access internal devices.
TO P IC DESC RIP T IO N

Automatic installation for UWP device apps This topic describes how automatic installation works and
how the app, metadata, and drivers can be updated and
uninstalled.

Hardware Support App (HSA): Steps for Driver Developers This topic provides steps for a driver developer to associate a
driver with a Universal Windows Platform (UWP) app.

Hardware Support App (HSA): Steps for App Developers This topic provides steps for an app developer to associate a
Universal Windows Platform (UWP) app with a Universal
Windows driver.
Overview of Driver Technologies
11/23/2022 • 2 minutes to read • Edit Online

For general information about developing drivers see Getting started with Windows drivers and Write your first
driver.
The majority of the driver technology information is the same for all editions of Windows 10. When you must
make special considerations for a particular edition of Windows, such as for Windows 10 Mobile, we explicitly
called these out in each technology area.

Windows drivers
You can create a Windows Driver—a driver that uses a subset of the available interfaces—to run on all editions
of Windows 10. Where possible, use a Windows Driver to enable deployment of your drivers on multiple
devices. For more information about how to build, install, deploy, and debug a Windows Driver for Windows 10,
see Getting Started with Windows Drivers and Deploying a Driver to a Test Computer.

Device drivers and Windows 10 for desktop computers


For information about the tools used to develop desktop drivers, see Driver Development Tools and Tools for
Verifying Drivers. For information about deploying drivers to Windows 10 on a desktop, see Device and Driver
Installation. For information about troubleshooting driver installation, see Troubleshooting Configuration of
Driver Deployment, Testing and Debugging.

Driver technologies
3D print devices
ACPI
Audio
Battery Drivers
Biometric Drivers
Bluetooth Drivers
Component Firmware Update (CFU)
Display drivers
File system drivers
Global Navigation Satellite System (GNSS) drivers
GPIO drivers
Hardware notifications
HID Drivers
IEEE Drivers
Imaging device drivers
Kernel-mode driver technology
Mobile broadband
Multifunction device drivers
NetAdapterCx
Network drivers
NFC device drivers
Parallel port drivers
Partner application development
PCI drivers
PCMCIA drivers
Point of Service device drivers
Power management technologies
Print device drivers
SD card bus drivers
Sensor drivers
Serial port drivers
Smartcard device drivers
Simple Peripheral Bus (SPB) drivers
Storage device drivers
Storage Firmware Update (SFU)
Streaming media device drivers
Test Authoring and Execution Framework (TAEF)
Universal Serial Bus (USB)
Windows Device Testing Framework (WDTF)
Windows Hardware Error Architecture (WHEA)
Windows portable device drivers

Related sections
Getting started with Windows drivers
Driver Development Tools
Partner Center for Windows Hardware
3D printer driver design guide
11/23/2022 • 2 minutes to read • Edit Online

This section provides information about 3D printer drivers in Windows 10.


3D printing in Windows 10 provides the following features:
Driver model for 3D manufacturing devices
Support for UWP apps and extensions for 3D devices
Job spooling and queuing support
Keywords for modeling device capabilities
API for apps to submit 3D manufacturing jobs to your 3D printer
For the latest information about 3D printing in Windows 10, see the following resources:
3D printing on Windows
3D hardware partners
3D Builder resources
3D Builder user's guide
Channel 9 3D printing blog
Download the Windows 3D Printing SDK to start developing drivers for printing to a 3D printer.

In this section
3D print partner onboarding guide
Microsoft Standard Driver for 3D Printers
MS3DPrint Standard G-Code driver
3D printer custom USB interface support
3D printing sample WSD app
Enable WSPrint 2.0 on a device
Print schema keywords for 3D manufacturing
3D hardware partners

Related sections
Print DDI reference
ACPI design guide
11/23/2022 • 2 minutes to read • Edit Online

This section describes how device drivers can interface with an Advanced Configuration and Power Interface
(ACPI) device.
ACPI devices are defined by the Advanced Configuration and Power Interface (ACPI) Specification.

In this section
SEC T IO N DESC RIP T IO N

Supporting ACPI Devices Provides information about how to use a Windows Driver
Model (WDM) function driver to enhance the functionality of
an ACPI device.

Evaluating ACPI Control Methods Provides information about how device drivers that comply
with the requirements of Kernel-Mode Driver Framework
(KMDF), User-Mode Driver Framework (UMDF), or Windows
Driver Model (WDM) can evaluate ACPI control methods.

How to Identify the Windows Version in ACPI by Using _OSI Provides information about the ACPI Source Language (ASL)
Operating System Interface Level (_OSI) method used to
identify the host operating system.

Related sections
ACPI DDI reference
Audio Devices Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This section describes how to design Microsoft Windows Driver Model (WDM) audio drivers. These drivers
control audio adapters that render and capture streams containing audio data in wave and MIDI formats.
The following topics are discussed:
Windows 10: What's New for Audio Drivers
Windows Audio Architecture
Roadmap for Developing WDM Audio Drivers
WDM Audio Drivers Overview
WDM Audio Architecture: Basic Concepts
WDM Audio Architecture: Advanced Topics
WDM Audio Support in Different Versions of Windows
Windows Audio Processing Objects
Audio Miniport Drivers
Legacy Audio Interfaces
Battery Devices Design Guide
11/23/2022 • 2 minutes to read • Edit Online

A battery typically has a pair of drivers: the generic battery class driver that Microsoft provides, and a miniclass
driver written specifically for that individual type of battery.
The class driver defines the overall functionality of the batteries in the system and interacts with the power
manager.
This design guide focuses on Writing Battery Miniclass Drivers.
In addition this section includes information on Writing UPS Minidrivers that were used with older versions of
Windows.
Biometric Devices Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This section describes how to write user-mode drivers that work with the Windows Biometric Driver Interface
(WBDI). WBDI is the driver interface of the Windows Biometric Framework (WBF). WBF ships with Windows 7
and later versions of the Windows operating system.

In this section
Getting Started with Biometric Drivers
Roadmap for Developing Biometric Drivers
Sample Biometric Driver
Supporting Biometric IOCTL Calling Sequence
Using WinUSB in a WBDI Driver
Installing a Biometric Driver
Managing Queues in a WBDI Driver
Creating a Device Interface for a WBDI Driver
Supporting Secure Channels in WBDI Drivers
Using WBDI with Non-PnP Devices or Proprietary Stacks
Hardware Considerations for Biometric Drivers
Ranking a Biometric Driver on Windows Update
Testing Biometric Drivers
Signing WBDI Drivers
Windows Hello: Steps to Submit a Fingerprint Driver
Custom Control Codes
Bluetooth Profile Drivers
11/23/2022 • 2 minutes to read • Edit Online

This section describes Bluetooth profile drivers. The information in this section is divided into the following
topics:
Bluetooth Profile Drivers Overview
Bluetooth Low Energy Overview
Using the Bluetooth Driver Stack
Debugging Bluetooth Profile Drivers
Bluetooth FAQ
Transport Bus Driver for Bluetooth Power Control Handling Guidelines
Bluetooth LE Proximity Profile Devices and Apps
Component Firmware Update (CFU)
11/23/2022 • 2 minutes to read • Edit Online

Component Firmware Update (CFU) provides Original Equipment Manufacturers (OEMs) and Independent
Hardware Vendors (IHVs) a reliable and authenticated method for updating firmware on devices that have
shipped to customers. This release contains reference firmware for receiving the firmware payload.

NOTE
CFU is available in Windows 10, version 2004 (Windows 10 May 2020 Update) and later versions.

See the Introducing Component Firmware Update blog post and WinHEC 2018 - Component Firmware Update
video for an introduction to CFU concepts.

In this section
TO P IC DESC RIP T IO N

CFU firmware implementation guide Provides detailed guidance on implementing the CFU
firmware protocol and creating new firmware images to
install on the target device.

CFU INF file configuration Provides information on configuring your custom device INF
file for your firmware update.

CFU protocol specification Provides detailed information on the CFU protocol offer,
content, and firmware update command sequence.

CFU standalone tool Provides information on the CFU standalone tool that sends
firmware update image files to a device. It can be used to
test your firmware update on your device during
development and before uploading it to Windows Update.

CFU virtual HID device firmware update simulation Simulates updating firmware on a virtual HID device.
Driver design guides for display and graphics
devices
11/23/2022 • 2 minutes to read • Edit Online

The following design guides are provided for developers of display and graphics drivers on Windows. For
information about available "Video driver samples", see Windows driver samples.
Windows Display Driver Model (WDDM)
WDDM is the display/graphics driver architecture available starting with Windows Vista. Drivers that
adhere to WDDM run on Windows Vista and later.
Legacy: Windows 2000 Display Driver Model (XDDM)
XDDM was the display/graphics driver architecture available for Windows 2000 through Windows Vista
and Windows 7 only.
Driver Development Tools
11/23/2022 • 2 minutes to read • Edit Online

Purpose Resources
The Windows Driver Kit (WDK) provides a set of tools Getting Started with Universal Windows Drivers
that you can use to develop, analyze, build, install, and
test your driver. The WDK includes powerful verification Universal Windows drivers allow developers to create a
tools that are designed to help you detect, analyze, and single driver that runs across multiple different device
correct errors in driver code during the development types, from embedded systems to tablets and desktop
process. Many of these tools can be used very early in PCs. Hardware developers can use their existing
the development process where they are most critical components and device drivers across different form
and can save you the most time and effort. factors.

Over view Converting WDK 8.1 Projects to WDK 10

The Windows Driver Kit (WDK) is fully integrated with You can convert projects and solutions that you created
Microsoft Visual Studio 2015. The WDK uses the same with WDK 8 or Windows Driver Kit (WDK) 8.1 to work
compiler and build tools that you use to build Visual with Windows Driver Kit (WDK) 10 and Visual Studio
Studio projects. The code analysis and verification tools 2015. Before you open the projects or solutions, run the
can now be easily configured and launched from the ProjectUpgradeTool. The ProjectUpgradeTool converts
Visual Studio development environment, so that you can the projects and solutions so that they can be built
find and fix problems in your driver source early in the using WDK for Windows 10.
development cycle. Validating Universal Windows drivers
The WDK provides a sophisticated driver test framework You can use the ApiValidator.exe tool to verify that the
and a set of device fundamental tests that you can use APIs that your driver calls are valid for a Universal
to automatically build, deploy, and test your driver on Windows driver. The tool returns an error if your driver
remote test systems. The WDK provides the tools to calls an API that is outside the set of valid APIs for
make testing and debugging drivers more convenient Universal Windows drivers. This tool is part of the WDK
and effective than before. for Windows 10.
Driver Development Tools Documentation WDK and Visual Studio build environment
This section describes the tools and techniques that can More information and tips for driver developers about
help you during development: using the WDK and the Visual Studio build environment.
Tools for INF Files Developing, Testing, and Deploying Drivers
For specific information about building drivers, and using
Tools for Changing Boot Options for Driver Testing and the verification tools and tests in the Visual Studio
Debugging development environment.
Tools for Testing Drivers
Tools for Verifying Drivers
Tools for Software Tracing
Additional Driver Tools
File systems driver design guide
11/23/2022 • 2 minutes to read • Edit Online

This section of the WDK provides design guidelines related to file systems and filter drivers. See the
programming reference for reference pages.

File systems
File systems in Windows are implemented as file system drivers working above the storage system.
Every system-supplied file system in Windows is designed to provide reliable data storage with varying features
to meet the user's requirements. Standard file systems available in Windows include NTFS, ExFAT, UDF, and
FAT32. A comparison of features for each of these file systems is shown in File System Functionality
Comparison. Additionally, the Resilient File System (ReFS), available on Windows Server 2012 and later versions,
offers scalable large volume support and the ability to detect and correct data corruption on disk.
Developing a new file system driver is almost always unnecessary, and requirements/specifications for new file
system drivers are not predictable. To that end, this design guide does not cover file system development. If you
do need to develop a new file system driver beyond those available in Windows, sample code is available as a
model (see below).

File system filter drivers


A file system filter driver, or minifilter, intercepts requests targeted at a file system or another file system filter
driver. By intercepting the request before it reaches its intended target, a minifilter can extend or replace
functionality provided by the original target of the request. Examples of filter drivers include:
Anti-virus filters
Backup agents
Encryption products
Filter driver developers use the system-supplied Filter Manager, which provides a framework for developing
filter drivers without having to manage all the complexities of file I/O. The Filter Manager simplifies the
development of third-party filter drivers and solves many of the problems with the legacy filter driver model,
such as the ability to control load order through an assigned altitude.

File system and filter sample code


A number of Windows driver samples are available, including samples for file system development and file
system filter driver development. See Windows driver samples for a complete list.

File system filter driver certification


Certification information for File Systems and File System Filter Drivers is found in the Windows Hardware Lab
Kit (HLK). Tests for File Systems and File System Filter Drivers are found in the Filter.Driver category of the HCK.

Additional resources
Along with this documentation and the sample code mentioned above, OSR offers a variety of resources for file
system filter development, including seminars and community discussion forums such as the NTFDS forum.
Getting started with drivers on Windows
11/23/2022 • 2 minutes to read • Edit Online

Start here to learn fundamental concepts about drivers.


You should already be familiar with the C programming language, and you should understand the ideas of
function pointers, callback functions, and event handlers.

In this section
What is a driver?
Do you need to write a driver?
Choosing a driver model
Write your first driver
Windows compatible hardware development boards
Sharks Cove hardware development board
Provision a computer for driver deployment and testing (WDK 10)
Concepts for all driver developers

Related topics
Windows Driver Kit (WDK)
Driver Security Guidance
Global Navigation Satellite System (GNSS) driver
design guide
11/23/2022 • 2 minutes to read • Edit Online

This section contains design guidance for building Global Navigation Satellite System (GNSS) device drivers.

In this section
Global Navigation Satellite System (GNSS) driver design guide for Windows 8.1
Global Navigation Satellite System (GNSS) driver design guide for Windows 10

Related sections
Global Navigation Satellite System (GNSS) DDI reference
General-Purpose I/O (GPIO) Driver Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This section describes how to write a driver for a general-purpose I/O (GPIO) controller device. A GPIO
controller configures GPIO pins to perform low-speed data I/O operations, to act as device-selects, and to
receive interrupt requests. Starting with Windows 8, the GPIO framework extension (GpioClx) simplifies the task
of writing a driver for a GPIO controller. Additionally, GpioClx provides a uniform I/O request interface to
peripheral device drivers that communicate with devices that connect to GPIO pins on a controller.

In this section
TO P IC DESC RIP T IO N

GPIO Driver Support Overview Starting with Windows 8, the GPIO framework extension
(GpioClx) simplifies the task of writing a driver for a
GPIO controller device. Additionally, GpioClx provides
driver support for peripheral devices that connect to
GPIO pins. GpioClx, which is a system-supplied
extension to the kernel-mode driver framework (KMDF),
performs processing tasks that are common to members
of the GPIO device class.

GpioClx I/O and Interrupt Interfaces Typically, the clients of a GPIO controller are drivers for
peripheral devices that connect to GPIO pins. These
drivers use GPIO pins as low-bandwidth data channels,
device-select outputs, and interrupt-request inputs.
Peripheral device drivers open logical connections to
GPIO pins that are configured as data inputs or outputs.
They use these connections to send I/O requests to
these pins. In addition, peripheral device drivers can
logically connect their interrupt service routines to GPIO
pins that are configured as interrupt request inputs.

GPIO-Based Hardware Resources Starting with Windows 8, the general-purpose I/O


(GPIO) pins that are controlled by a GPIO controller
driver are available to other drivers as system-managed
hardware resources. GPIO I/O pins, which are pins that
are configured as data inputs or data outputs, are
available as a new Windows resource type, GPIO I/O
resources. In addition, GPIO interrupt pins, which are
pins that are configured as interrupt request inputs, are
available as ordinary Windows interrupt resources.

GPIO Interrupts Some general-purpose I/O (GPIO) controller devices can


configure their GPIO pins to function as interrupt
request inputs. These interrupt request inputs are driven
by peripheral devices that are physically connected to
the GPIO pins. The drivers for these GPIO controllers
can enable, disable, mask, unmask, and clear interrupt
requests on individual GPIO pins.
TO P IC DESC RIP T IO N

GpioClx DDI The general-purpose I/O (GPIO) controller driver


communicates with the GPIO framework extension
(GpioClx) through the GpioClx device-driver interface
(DDI). This DDI is defined in the Gpioclx.h header file and
is described in General-Purpose I/O (GPIO) Driver
Reference. As part of this DDI, GpioClx implements
several driver support methods, which are called by the
GPIO controller driver. This driver implements a set of
event callback functions, which are called by GpioClx.
GpioClx uses these callbacks to manage interrupt
requests from GPIO pins that are configured as interrupt
inputs, and to transfer data to or from GPIO pins that
are configured as data inputs and outputs.
Hardware notifications design guide
11/23/2022 • 2 minutes to read • Edit Online

Describes support for key buttons (Power, Windows, volume and rotation lock) and other indicators in a
standardized way, together with associated corresponding Windows Engineering Guidance (WEG).

In this section
TO P IC DESC RIP T IO N

GPIO buttons and indicators implementation guide Windows 8 introduced support for general-purpose I/O
(GPIO) buttons and indicators by using a HID miniport class
driver. The goal was to provide support for key buttons
(Power, Windows, volume and rotation lock) in a
standardized way, together with associated corresponding
Windows Engineering Guidance (WEG). Windows 8.1 is
focused on enhancing the quality of the end-to-end user
experience and unifying the behavior across various
innovative form factors.

GPIO buttons and indicators supplemental testing This topic describes Windows 8.1 test scenarios for hardware
buttons and indicators, to ensure an optimal user experience
for various form factors.

Hardware notifications support Windows 10, version 1709 provides an infrastructure for the
hardware-agnostic support of notification components such
as LEDs and vibration mechanisms. This support is delivered
through the introduction of a Kernel-Mode Driver
Framework (KMDF) class extension specifically for hardware
notification components that allows for the rapid
development of client drivers. A KMDF class extension is
essentially a KMDF driver that provides a defined set of
functionality for a given class of devices, similar to a port
driver in the Windows Driver Model (WDM). This section
provides an overview of the architecture of the hardware
notification class extension. For additional information about
the KMDF, see Using WDF to Develop a Driver.
Introduction to Human Interface Devices (HID)
11/23/2022 • 2 minutes to read • Edit Online

Human Interface Devices (HID) is a device class definition to replace PS/2-style connectors with a generic USB
driver to support HID devices such as keyboards, mice, game controllers, and so on. Prior to HID, devices could
only utilize strictly-defined protocols for mice and keyboards. Hardware innovation required either overloading
data in an existing protocol or creating non-standard hardware with its own specialized driver. HID provided
support for these "boot mode" devices while adding support for hardware innovation through extensible,
standardized and easily-programmable interfaces.
HID devices today include a broad range of devices such as alphanumeric displays, bar code readers, volume
controls on speakers/headsets, auxiliary displays, sensors and many others. Many hardware vendors also use
HID for their proprietary devices.
HID began with USB but was designed to be bus-agnostic. It was designed for low latency, low bandwidth
devices but with flexibility to specify the rate in the underlying transport. The specification for HID over USB was
ratified by the USB-IF in 1996 and support over additional transports followed soon after. Details on currently
supported transports can be found in HID Transports Supported in Windows. Third-party, vendor-specific
transports are also allowed via custom transport drivers.

HID concepts
HID consists of two fundamental concepts, a report descriptor, and reports. Reports are the actual data that is
exchanged between a device and a software client. The report descriptor describes the format and meaning the
data that the device supports.
Reports
Applications and HID devices exchange data through reports. There are three report types:

REP O RT T Y P E DESC RIP T IO N

Input report Data sent from the HID device to the application, typically
when the state of a control changes.

Output report Data sent from the application to the HID device, for
example to the LEDs on a keyboard.

Feature report Data that can be manually read and written, and are typically
related to configuration information.

Each top level collection defined in a report descriptor can contain zero or more reports of each type.
Usage tables
The USB-IF working group publishes HID usage tables that are part of the report descriptors that describe what
HID devices are allowed to do. These HID usage tables contain a list with descriptions of Usages , which describe
the intended meaning and use of a particular item described in the report descriptor. For example, a usage is
defined for the left button of a mouse. The report descriptor can define where in a report an application can find
the current state of the mouse's left button. The usage tables are broken up into several name spaces, called
usage pages. Each usage page describes a set of related usages to help organize the document. The combination
of a usage page and usage define the usage ID that uniquely identifies a specific usage in the usage tables.
See also
USB-IF HID Specifications
IEEE 1394 bus driver design guide
11/23/2022 • 2 minutes to read • Edit Online

This section includes:


The IEEE 1394 Driver Stack
Installing IEEE 1394 Device Drivers
Asynchronous I/O for IEEE 1394 Devices
Isochronous I/O for IEEE 1394 Devices
Modifying the 1394 Configuration ROM
IEEE 1394 Hardware Emulation Drivers
1394 Samples and Diagnostic Tools
IEC-61883 Client Drivers
Imaging device driver design guide
11/23/2022 • 2 minutes to read • Edit Online

This section contains information about Windows Image Acquisition (WIA) drivers, Still Image (STI) drivers, and
Web Services on Devices (WSD).

NOTE
The WIA programming interface is used to develop imaging drivers for modern Windows operating systems. The STI
programming interface was used to develop imaging drivers in legacy Windows operating systems. The STI programming
interface documentation will be archived in a future release.

In this section
Device Interface Classes for Imaging Devices
Windows Image Acquisition Drivers
WIA Properties
64-Bit and WIA
WIA Compatibility Layer
WIA Driver Filters
WIA Item Trees
WIA with Web Services for Devices
Developing a WIA Driver
Developing a WIA Camera Driver
WIA Minidriver Best Practices
WIA Microdriver Commands
Building, Troubleshooting and Debugging WIA Minidrivers
WIA Samples and Tools
Still Image Drivers
Web Services on Devices
Web Services on Devices Reference

WIA and STI Driver Reference


The following table contains reference information for Windows Image Acquisition (WIA) drivers and for Still
Imaging (STI) drivers. These drivers control devices, including scanners and cameras, that capture still images.
For more information about these drivers, see Windows Image Acquisition Drivers and Still Image Drivers.
The following sections describe the interfaces, functions, structures, and properties used by WIA and STI drivers.
SEC T IO N DESC RIP T IO N

Device Interface Classes for Imaging Devices Device class GUID for imaging devices.

IWiaMiniDrv Interface Interface for managing all communications between a WIA


minidriver and the WIA service.

WIA Driver Services Library Functions Helper functions used by a WIA minidriver to manage device
items and data transfers.

WIA Properties Properties of WIA devices, including status, capabilities, and


device identification information.

WIA Utility Library Functions and Classes Utility functions and classes used by a WIA minidriver to
support debugging and to perform common tasks.

IWiaMiniDrvCallBack Interface Callback interface for transferring status and image data
between the WIA service and a WIA minidriver.

IWiaDrvItem Interface Interface used by a WIA minidriver to manage a tree of WIA


driver items.

IWiaErrorHandler Interface Interface used by a WIA minidriver to provide error status


and to support error recovery.

IWiaImageFilter Interface Interface implemented by an image processing filter and


called by the WIA service to communicate with the filter.

IWiaLog Interface and Diagnostic Log Macros Interface and macros used by a WIA minidriver to record
trace, error, and warning messages to a diagnostic log file.

IWiaSegmentationFilter Interface Interface used by a WIA minidriver to detect regions in a


segmented image.

IWiaTransferCallback Interface Interface implemented by an image processing filter and


called by the WIA service to initiate the processing of image
streams.

WIA Microdriver Functions, Structures, and Commands Functions, structures, and commands used by WIA
microdrivers.

WIA User Interface Extensions Interface used by device vendors to provide custom user
interfaces for their devices.

WIA Structures Structures used by driver-level WIA methods and functions.

Still Image Interfaces Interfaces, structures, data types, and control codes used by
STI drivers.

Web Services on Devices Reference Web Services on Devices information, including Scan Service
(WS-SCAN)

Related sections
Imaging DDI reference
Kernel-Mode Driver Architecture Design Guide
11/23/2022 • 3 minutes to read • Edit Online

NOTE
For information about programming interfaces that your driver can implement or call, see the Kernel-Mode Driver
Reference.

This section includes general concepts to help you understand kernel-mode programming and describes
specific techniques of kernel programming. For a general overview of Windows Drivers, see Getting Started
with Windows Drivers, which provides a general overview of Windows components, lists the types of device
drivers used in Windows, discusses the goals of Windows device drivers, and discusses generic sample device
drivers included in the kit.
This section contains conceptual information that describes and helps you build kernel-mode drivers.
An Over view containing:
An overview of Windows Components
Design Goals for Kernel-Mode Drivers
A catalogue of Sample Kernel-Mode Drivers
Kernel Driver Development Best Practices, as compiled by the Microsoft Surface team
Kernel-Mode Components describes the primary kernel-mode managers and components of the
Windows operating system.

C O M P O N EN T DESC RIP T IO N

Managers

Windows Kernel-Mode Object Manager Manages objects: files, devices, synchronization


mechanisms, registry keys, and so on.

Windows Kernel-Mode Memory Manager Manages physical memory for the operating system.

Windows Kernel-Mode Process and Thread Manager Handles the execution of all threads in a process.

Windows Kernel-Mode I/O Manager Manages the communication between applications and
the interfaces provided by device drivers.

Windows Kernel-Mode Plug and Play Manager A subsystem of the I/O manager, the Plug and Play (PnP)
Manager enables a PC to recognize when a device is
added to the system.

Windows Kernel-Mode Power Manager Manages the orderly change in power status for all
devices that support power state changes.

Windows Kernel-Mode Configuration Manager Manages the registry, such as monitoring changes in the
registry or registering callbacks on specific registry data.

Windows Kernel-Mode Kernel Transaction Manager Implements transaction processing in kernel mode.
C O M P O N EN T DESC RIP T IO N

Windows Kernel-Mode Security Reference Monitor Provides routines for your driver to work with access
control.

Libraries

Windows Kernel-Mode Kernel Library Implements the core functionality that everything else in
the operating system depends upon. The Microsoft
Windows kernel provides basic low-level operations such
as scheduling threads or routing hardware interrupts.

Windows Kernel-Mode Executive Support Library Refers to kernel-mode components that provide a
variety of services to device drivers, including: object
management, memory management, process and thread
management, input/output management, and
configuration management.

Windows Kernel-Mode Run-Time Library A set of common utility routines needed by various
kernel-mode components.

Windows Kernel-Mode Safe String Library A safe string library to provide greater security in kernel-
mode development.

Windows Kernel-Mode DMA Library A direct memory access (DMA) library for device driver
developers.

Windows Kernel-Mode HAL Library A hardware abstraction layer (HAL) for kernel-mode
driver development.

Windows Kernel-Mode CLFS Library A transactional logging system, the Common Log File
System (CLFS).

Windows Kernel-Mode WMI Library A general mechanism for managing components, called
Windows Management Instrumentation (WMI).

Writing WDM Drivers and Introduction to WDM provide information needed to write drivers using the
Windows Driver Model (WDM).
Device Objects and the other topics in Device Objects and Device Stacks describe how the
operating system represents devices by device objects.
Memor y Management for Windows Drivers illustrates how kernel-mode drivers allocate memory
for purposes such as storing internal data, buffering data during I/O operations, and sharing memory
with other kernel-mode and user-mode components.
Security From Controlling Device Access and Privileges to SDDL for Device objects, ensure that your
drivers are as secure as possible.
Handling IRPs describes how kernel-mode drivers handle I/O request packets (IRPs).
DMA Direct Memory Access (DMA) is a critical aspect of driver development, and the topics in this node
cover DMA from A to Z.
Controller Objects represent a physical device controller with attached devices.
Interrupt Ser vice Routines (ISRs) handle interrupts for drivers of a physical device that receives
interrupts.
Message-Signaled Interrupts trigger an interrupt by writing a value to a particular memory address.
Deferred Procedure Calls (DPC Objects) can be queued from ISRs and are executed at a later time
and at a lower IRQL than the ISR.
Plug and Play (PnP) focuses on the system software support for PnP and how drivers use that support
to implement PnP.
Power Management describes the architecture that provides a comprehensive approach to system and
device power management.
Windows Management Instrumentation (WMI) are extensions to your kernel-mode driver, which
enable your driver to become a WMI provider. A WMI provider makes measurement and instrumentation
data available to WMI consumers, such as user-mode applications.
Driver Programming Techniques Programming drivers in the kernel mode of Windows requires
techniques that sometimes differ significantly from those of ordinary user-mode programming.
Mobile broadband
11/23/2022 • 2 minutes to read • Edit Online

Use the docs in this section to learn more about mobile broadband and how to configure mobile broadband
experiences for your customers.
Overview
Using metadata to configure mobile broadband experiences
Mobile operator scenarios
Multifunction device driver design guide
11/23/2022 • 2 minutes to read • Edit Online

A multifunction device occupies one location on its parent bus but contains more than one function.
Combination printer/scanner/fax devices and modem/network cards are common multifunction devices.
In a multifunction device, the individual functions are independent. This means the functions must have the
following characteristics:
The functions cannot have start-order dependencies.
The resource requirements for one function cannot be expressed in terms of the resources of another
function (for example, function1 uses I/O port x and function2 uses port x + 200).
Each function must be able to operate as a separate device, even if it is serviced by the same drivers as
another function.
Each function on the device must be enumerated.
Resource requirements for each function must be communicated to the PnP manager.
There must be INF files and drivers for each function.
The component responsible for each of these tasks depends on the multifunction standard for the device's
parent bus, the extent to which the device conforms to the standard, and the capabilities of the parent bus driver.
If the device complies with the multifunction standards for its bus, your driver requirements are significantly
reduced. Industry-wide multifunction standards have been defined for the PC Card and PCI buses.
If you are working with a multifunction DVD/CD-ROM device used for data storage (not for audio/video
playback), you should use the system-supplied WDM DVD class driver, which treats the device as a single logical
unit.
For a multifunction device that combines other functionality, you can use a system-supplied driver and INF file if
the device complies with the multifunction standards for its bus. The system supplied multifunction driver
(mf.sys) can handle the bus-level enumeration and resource allocation requirements for the device, and the
system-supplied INF (mf.sys) can install the multifunction device. You need to supply only a function driver and
INF file for each of the individual device functions.
If the device does not comply with the standard for its bus, you might need to supply a driver equivalent to
mf.sys in functionality, in addition to function drivers and INF files for the device functions.
To install a multifunction device, you typically provide a base INF file for the device and an additional INF file for
each of the device's functions. The base INF file typically copies the INF files for the device's individual functions.
For information about how to accomplish this, see Copying INFs.
The following sections describe driver and installation requirements for various types of multifunction devices:
Supporting Multifunction PC Card Devices
Supporting Multifunction PCI Devices
Supporting Multifunction Devices On Other Buses
Using the System-Supplied Multifunction Bus Driver
Creating Resource Maps for a Multifunction Device
See INF File Sections and INF File Directives for information about INF file syntax.
The Windows Driver Kit (WDK) includes a separate section that describes how to support multifunction audio
devices.
Network Adapter WDF Class Extension
(NetAdapterCx)
11/23/2022 • 2 minutes to read • Edit Online

Overview
Starting in Windows 10, version 2004, the Windows Driver Kit (WDK) includes a Network Adapter WDF Class
Extension module (NetAdapterCx) that enables you to write a KMDF-based client driver for a Network Interface
Controller (NIC). NetAdapterCx gives you the power and flexibility of WDF and the networking performance of
NDIS, and makes it easy to write a driver for your NIC.
In previous versions of Windows, WDF and NDIS had individual advantages, but did not interoperate well. The
only way to write a NIC driver was to write an NDIS miniport driver. To use WDF in an NDIS miniport driver, you
had to write extra code in your driver, and even then, you only had access to a small subset of WDF functionality.
With the NetAdapterCx model, conversely, you write a real WDF driver for your NIC. This means that your
NetAdapterCx driver has access to full WDF functionality, as well as networking-specific APIs and I/O support
from the NetAdapter class extension. As shown in the block diagram below, NetAdapterCx still works behind the
scenes with NDIS, but it handles all the interaction with NDIS on your behalf.

Additional info
To watch a video that discusses the benefits of using NetAdapterCx, see the Network Adapter Class Extension:
Overview video on Channel 9.
To learn how to port an NDIS 6.x miniport driver to the NetAdapterCx NIC driver model, see Porting NDIS
miniport drivers to NetAdapterCx.
To start working right away with driver samples on GitHub, clone our NetAdapter-Cx-Driver-Samples repo.
To see the source code for NetAdapterCx itself, or perform step-through debugging, see our Network-Adapter-
Class-Extension repo on GitHub.
If you would like to work with Microsoft as you develop a NetAdapterCx client driver, or have feedback on the
class extension, please send us an email.
To watch a video that discusses the future roadmap and collaboration opportunities, see the Network Adapter
Class Extension: Roadmap and Collaboration video on Channel 9.

Topics
This section contains the following topics:
Porting NDIS miniport drivers to NetAdapterCx
Building a NetAdapterCx client driver
INF files for NetAdapterCx client drivers
Managing the lifetime of objects in NetAdapterCx
Accessing configuration information
Debugging a NetAdapterCx client driver
Transferring network data
NetAdapterCx receive side scaling (RSS)
Configuring power management
NDIS-WDF function equivalents
NetAdapterCx limitations
Mobile Broadband (MBB) WDF class extension (MBBCx)
Wi-Fi WDF class extension (WiFiCx)
Network Driver Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This Network Driver Design Guide describes how to design and create network device drivers for Windows
operating systems beginning with Windows Vista.
This guide includes the following sections:
Introduction to Network Drivers
NDIS version guide
NDIS Core Functionality
Scalable Networking
Virtualized Networking
Wireless Networking
Network Module Registrar
Winsock Kernel
IP Helper
Windows Filtering Platform Callout Drivers
System Area Networks
Remote NDIS (RNDIS)
Kernel Mode SDK Topics for Network Drivers
Previous Versions of Network Drivers
Near field communications (NFC) design guide
11/23/2022 • 2 minutes to read • Edit Online

Windows exposes a rich set of experiences using NFC technology including:


Wi-Fi Direct pairing - Peripheral devices can participate in Tap and Setup and Tap and Reconnect use cases.
Near field proximity – Provides a common surface for Windows to use NFP capabilities.
Smart card support – Allows callers to the NFC device driver to perform low level smart card operations on
NFC contactless smart cards.
NFC power management - NFC drivers intelligently manage the power state of the device.
To enable NFC support, Microsoft relies on IHVs to provide device drivers that implement the device driver
interface (DDI) defined in these topics. Use the User-Mode Driver Framework (UMDF) 2.0 to write NFC drivers
for Windows.

Related topics
Getting Started with UMDF
NFC device driver interface (DDI) reference
Parallel Device Driver Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This section includes:


Introduction to Parallel Ports and Devices
System-Supplied Parallel Drivers
Vendor-Supplied Parallel Drivers
Parallel Devices Reference
Partner app development
11/23/2022 • 2 minutes to read • Edit Online

Partners have the ability to create special use applications for things like the Windows 10 settings app. Some
partner-specific app development scenarios require functionality, such as access to system APIs, that is not
available to APIs with General capabilities. Instead these apps require Restricted or special use capabilities,
allowing for functionality available for partner development in a controlled fashion.

In this section
TO P IC DESC RIP T IO N

Background tasks and custom triggers for device drivers Learn how to use tasks and triggers in conjunction with your
device drivers and apps.

Create a partner settings app Learn how to create an OEM settings apps for custom
hardware components to help differentiate your brand.

Mobile Broadband Learn more about mobile broadband and how to configure
mobile broadband experiences for your customers.

Wi-fi Direct Learn more about Wi-Fi Direct and the Wi-Fi Direct Services
API in Windows.
PCI driver programming guide
11/23/2022 • 2 minutes to read • Edit Online

The following table summarizes the PCIe features that are supported by different versions of Windows. For
details, see the specified sections in the official PCIe specification.

F EAT URE M IN IM UM W IN DO W S VERSIO N

Resizable BAR capability Windows 10


See section 7.22.

Atomic Operations Windows 10


See section 6.15.

ACPI additions for FW latency optimizations Windows 10


See ACPI Additions for FW Latency Optimizations

ATS/PRI Windows 10
- ATS specification
- Errata for the PCI Express® Base Specification Revision
3.1, Single Root I/O Virtualization and Sharing Revision 1.1,
Address Translation and Sharing Revision 1.1, and M.2
Specification Revision 1.0

Optimized Buffer Flush/Fill (OBFF) - Windows 8


See section 6.19. - Windows Server 2012

Latency Tolerance Reporting (LTR) Capability - Windows 8


See section 7.25. - Windows Server 2012

Alternative Routing-ID Interpretation (ARI) - Windows 8


See section 6.13. - Windows Server 2012

Message Signaled Interrupt (MSI/MSI-X) Support - Windows Vista


See section 6.1.4. - Windows Server 2008 R2

TLP Processing Hints (TPH) - Windows 8


See section 6.17. - Windows Server 2012

Single Root I/O Virtualization (SR-IOV) - Windows 8


See Single Root I/O Virtualization (SR-IOV). - Windows Server 2012

In this section
PCI Power Management and Device Drivers
Accessing PCI Device Configuration Space
I/O Resource Usage Reduction
Order of Resources in Start-Device IRP
PCI Express FAQ for Graphics
PCI Sample
Obtaining PCI Segment Values
See Also
Official PCIe specification
PCMCIA Bus Driver Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This section includes:


Access Attribute Memory of a PCMCIA Device
PCMCIA_INTERFACE_STANDARD Interface for Memory Cards
PCMCIA IRQ Routing on Windows XP
POS device driver design guide
11/23/2022 • 2 minutes to read • Edit Online

This section provides driver design guidance for point-of-service (POS) devices.

In this section
TO P IC DESC RIP T IO N

POS driver samples Provides samples that demonstrate how to create universal
drivers for point-of-service (POS) devices.

Barcode scanner Bluetooth service UUIDs Describes UUIDs for use with the Bluetooth Service
Discovery Protocol (SDP) for barcode scanners.

Barcode scanner events Describes events that are specific to barcode scanners.

Magnetic stripe reader events Describes events that are specific to magnetic stripe readers
(MSRs).

POS events Describes general POS events that are passed from the
device driver to the POS API layer.

Related sections
POS DDI reference
Power Metering and Budgeting Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This section describes the Power Metering and Budgeting (PMB) infrastructure and the Power Meter Interface
(PMI).
This section contains the following topics:
Overview of the Power Metering and Budgeting Infrastructure
User-Mode Power Service
Power Meter Interface
Software Defined Batteries
ACPI Power Meter Interface
Energy Meter Interface
EMI naming convention
Printer driver design guide
11/23/2022 • 2 minutes to read • Edit Online

This section provides information on designing, testing, and debugging printer drivers.

In this section
V4 Printer Drivers
Microsoft Printer Drivers
Printer Driver Overview
Microsoft Universal Printer Driver
Microsoft PostScript Printer Driver
Microsoft Plotter Driver
GDI Printer Drivers
Print Ticket and Print Capabilities Technologies
Writing 64-Bit Printer Drivers
Installing and Configuring Printer Drivers
Printer Configuration
Generic Description Language (GDL)
GDL Reference
GDL Examples
Printer Autoconfiguration
Autoconfiguration Details
Autoconfiguration Implementation Options
Bidirectional Communication
Bidirectional Communication Schema Reference
Bidi Interfaces and Enumerations
Asynchronous User Notification Schema
Web Services for Devices Print Service Schema
Printer Driver Isolation
Customizing Microsoft Printer Drivers
COM Interfaces for Printer Web Pages
Print Pipeline Property Bag
Additional Printer Topics
Print Spooler Components
Printer Driver Testing and Debugging

Related sections
Print DDI reference
SD Bus Driver Design Guide
11/23/2022 • 2 minutes to read • Edit Online

SD Card Driver Stack


Opening, Initializing and Closing an SD Card Bus Interface
Handling SD Card Interrupts
SD Card Requests
SD Card I/O Requests
Secure Digital Requests That Use Direct I/O
Secure Digital Requests That Use Extended I/O
Managing SD Cards in User-Mode Applications
Restrictions on SD Card Drivers

SD Card Hardware Identifiers


For information about Secure Digital (SD) device identification strings, see Identifiers for Secure Digital (SD)
Devices.

Restrictions on SD Card Drivers


Certain restrictions apply to Secure Digital (SD) card device drivers that manage a function on an SD combo or
multifunction card. The driver stacks for the various card functions on a multifunction card must operate
independently of one another. To ensure this independence, the bus driver rejects the following operations:
SD commands that change the device state, such as SELECT_CARD.
SD I/O commands that specify function zero but are outside the range of the address specified in the
function basic register (FBR).
SD I/O commands that specify a function number of a different device stack.
SD device drivers can manage the host controller's common register set and the state of the device by calling
SdBusSubmitRequest with function requests of type SDRF_GET_PROPERTY and SDRF_SET_PROPERTY. For a
description of these function request types, see SD_REQUEST_FUNCTION .

SD Bus Sample (Windows 8.1)


This sample (no longer supported) is a functional Secure Digital (SD) IO driver. The driver is written using the
Kernel Mode Driver Framework. It is a driver for a generic mars development board that implements the SDIO
protocol without additional functionality.
Download the Storage SDIO driver sample from GitHub.
Introduction to the Sensor and Location Platform in
Windows
11/23/2022 • 4 minutes to read • Edit Online

The Windows operating system provides native support for sensor devices. This support includes location
sensors such as GPS devices. As part of this support, the platform provides a standard way for device
manufacturers to expose sensor devices to software developers and consumers. At the same time, the platform
gives developers a standardized API and device driver interface (DDI) to work with sensors and sensor data. This
section summarizes the Windows sensor and location platform, discusses the various parts of the platform, and
describes how the pieces work together to provide a comprehensive system for working with sensors.

Sensor Device Overview


Sensors come in many configurations and, from a certain perspective, almost anything that provides data about
physical phenomena can be called a sensor. Although we typically think of sensors as hardware devices, logical
sensors can also provide information through emulation of sensor functionality in software or firmware. Also, a
single hardware device can contain multiple sensors.
The sensor and location platform organizes sensors into categories , which represent broad classes of sensor
devices, and types , which represent specific kinds of sensors. For example, a sensor in a video game controller
that detects the position and movement of a player's hand (perhaps for a video bowling game) would be
categorized as an Orientation sensor, but its type would be 3-D Accelerometer. In code, Windows represents
categories and types by using globally unique identifiers (GUIDs), many of which are predefined. Device
manufacturers can create new categories and types by defining and publishing new GUIDs, when it is required.
Location devices comprise one especially interesting category. By now, most people are familiar with global
positioning systems (GPS). In Windows, a GPS is a kind of sensor that is part of the Location category. The
Location category could include other sensor types. Some of these sensor types are software based, such as an
IP resolver that provides location information based on an Internet address, a cellular phone tower triangulator
that determines location based on nearby towers, or a sensor that determines location from the presence of Wi-
Fi networks.

About the Platform


The Windows sensor and location platform consists of the following developer and user components:
The DDI. Windows provides a standard way for sensor devices to connect to the computer and to provide
data to other subsystems.
The Windows Sensor API provides a set of methods, properties, and events to work with connected
sensors and sensor data.
The Windows Location API, which is built on the Windows Sensor API, provides a set of programming
objects. These objects include scripting objects, for working with location information.
The Control Panel gives computer users control over location settings.
The following sections describe each of these components.
Device Driver Interface
Sensor manufacturers can create device drivers to connect sensors with Windows. Sensor device drivers are
implemented by using the Windows Portable Devices (WPD) driver model, which is based on the Windows User
Mode Driver Framework (UMDF).Many device drivers have been written by using these frameworks. Because
these technologies are established, experienced device driver programmers will find writing a sensor driver to
be a familiar task. The sensor DDI uses specific UMDF and WPD data types and interfaces, and also defines
sensor-specific WPD commands and parameters, where it is required.
To help make it easier to write a device driver that exposes a sensor to Windows (and to the sensor and location
platform in particular), the operating system includes a driver class extension. A required component for sensor
device drivers, this COM object provides a simple set of interfaces that enable programmers to implement a
sensor driver without writing lots of boilerplate code. The class extension can also reduce, or even eliminate, the
need to manage WPD calls. This documentation contains detailed information about the sensor DDI and class
extension object.
Sensor API
The Windows Sensor API enables C++ developers to create sensor-based programs by using a set of COM
interfaces. The API defines interfaces to perform common sensor programming tasks that include managing
sensors by category, type, or ID, managing sensor events, working with individual sensors and sensor
collections, and working with sensor data. The Windows SDK includes header files, documentation, samples, and
tools to help guide software developers on how to use sensors in Windows programs.
Location API
Built on the sensor platform, the Location API provides an easy way to retrieve data about geographic location
while protecting user privacy. The Location API provides its functionality through a set of COM interfaces that
represent objects. These objects can be used by programmers who understand how to use COM through the
C++ programming language, or in scripting languages, such as JScript. Scripting support gives easy access to
location data for projects that run in the Local Computer zone, such as gadgets. The Windows SDK includes
header files, documentation (including scripting reference documentation), samples, and tools to help guide
Web and software developers on how to use location information in their programs.
User Control Panel
Windows includes a control panel that allows computer users to enable or disable location settings. Because
thesesettings can expose sensitive data, this user interface gives users control over whether programs have
access to their location.

Whitepapers
T IT L E DESC RIP T IO N

HID Sensors Usages This paper provides information about the HID Sensor Class
Driver for Windows 8 and later operating systems.

Integrating Ambient Light Sensors with Computers Running This paper provides information about ambient light sensor
Windows 10 Creators Update (ALS) features in the Windows 10 operating system.

Integrating Motion and Orientation Sensors This paper is intended to help OEMs, ODMs, and IHVs
understand motion and orientation sensor capabilities and
requirements for Windows 10 and earlier operating systems.

Related sections
Sensors DDI reference
Sensors Blogs
Serial Controller Driver Design Guide
11/23/2022 • 2 minutes to read • Edit Online

You can design a driver or application that uses the serial I/O request interface to communicate with a peripheral
device connected to a serial port. A serial port is a hardware communication interface on a serial controller,
which is a 16550 UART or compatible device. To control a serial port to which a peripheral device is permanently
connected, you can design a custom serial controller driver that works with version 2 of the serial framework
extension (SerCx2), which replaces version 1 (SerCx).
In older versions of Windows, a named serial COM port located on the case of a PC, the inbox Serial.sys and
Serenum.sys drivers were used.

NOTE
This topic describes programming traditional COM ports. For information on USB attached serial ports, see USB serial
driver (Usbser.sys).

SerCx2
You can write a serial controller driver that works together with version 2 of the serial framework extension
(SerCx2) to manage a serial controller. You can also write a peripheral driver for a peripheral device that is
connected to a port on a serial controller that is jointly managed by SerCx2 and a serial controller driver. This
peripheral driver uses the serial I/O request interface to transfer data to and from the device. An extension-
based serial controller driver handles all hardware-specific tasks for the serial controller, but uses SerCx2 to
perform many system tasks that are common to all serial controllers. SerCx2 is a system-supplied component
starting with Windows 8.1.
SerCx2 relieves the serial controller driver of the processing work required to manage time-outs, and to
coordinate I/O transactions that compete for access to the serial controller. As a result, the serial controller driver
is smaller and simpler. The hardware vendor for the serial controller supplies an extension-based serial
controller driver that manages the hardware-specific functions in the serial controller, and that relies on SerCx2
to perform generic serial-controller tasks. This driver communicates with SerCx2 through the SerCx2 device
driver interface.
For more information about SerCx2, see Using Version 2 of the Serial Framework Extension (SerCx2).

In this section
Using Version 2 of the Serial Framework Extension (SerCx2)
Previous Versions of Windows - Serial Controller Drivers
Serial IRP major function codes
Serial Port Console Redirection Table (SPCR)
Smart Card Reader Devices Design Guide
11/23/2022 • 2 minutes to read • Edit Online

Design guide for developing drivers for smart card reader devices.

In this section
TO P IC DESC RIP T IO N

Smart Card Driver Environment Describes the standard environment for the smart card
reader driver.

Management of IOCTL Requests in a Smart Card Reader Explains how reader drivers manage IOCTL requests, how
Driver the callback routine mechanism works, and what a reader
driver must do to initialize its callback routines.

WDM Reader Driver Lists the routines that are required by a WDM reader driver.

Smart Card Minidrivers The smart card minidriver provides a simpler alternative to
developing a legacy cryptographic service provider (CSP) by
encapsulating most of the complex cryptographic operations
from the card minidriver developer.

Smart Card Reader States A table listing the Smart Card reader states and their
meanings.

Installing Smart Card Reader Drivers Provides installation information that is specific to smart
card reader drivers for Windows.

Registering a WDM Smart Card Reader Driver Provides required registry values and their descriptions for
registering a WDM Smard Card Reader driver.

Enabling Smart Card Event Logging in the Registry Registry value name and contents of the registry value for
event logging.

WDM Device Names for Smart Card Readers Instructions for complying with the naming conventions for
device names in Windows operating systems.

Smart Card Driver Debugging Describes the smart card driver libraries support of
debugging features.

Specifications and Resources To work with the smart card support in Microsoft Windows
operating systems, smart card readers and cards should be
compatible with Interoperability Specification for ICCs and
Personal Computer Systems. Smart card readers and device
drivers should also be Plug and Play compliant.
Simple Peripheral Bus (SPB) Driver Design Guide
11/23/2022 • 2 minutes to read • Edit Online

This section describes how to write a driver for a simple peripheral bus (SPB) controller device or for a
peripheral device that is connected to an SPB. The SPB category includes buses such as I²C and SPI. The
hardware vendor for an SPB controller device provides an SPB controller driver to manage the hardware
functions in the controller. This driver might support a family of similar controller devices. The hardware vendor
for an SPB-connected peripheral device provides an SPB peripheral driver to manage the hardware functions in
the peripheral device. This driver might support a family of peripheral devices across a variety of hardware
platforms that provide compatible SPBs.
In versions of Windows before Windows 8, the operating system obtained information from SPB-connected
devices on a PC motherboard only indirectly through the platform firmware. Starting with Windows 8, hardware
vendors can supply Windows drivers to directly control their SPB controllers and their SPB-connected peripheral
devices, and to make these devices available for use by the operating system and by applications. For more
information, see SPB Controller Drivers and SPB Peripheral Device Drivers.
SPBs are frequently used to connect low-speed peripheral devices to motherboard chipsets and System on a
Chip (SoC) modules. An integrated circuit requires fewer pins to connect to a serial bus than to a parallel bus,
which transmits multiple bits of data per clock cycle. Typically, SPBs are used in cost-sensitive applications in
which low pin counts and simple connections are more important than data transmission speed. Because SPBs
run at low speeds and require few electrical connections, they are frequently used in applications in which
battery power must be conserved.
For example, the PC motherboard in a laptop computer might use an I²C bus to communicate with a low-speed
device that monitors the battery level. Similarly, the SoC module in a smart phone or other mobile device might
use an I²C bus to connect to a sensor device, such as an accelerometer, a GPS device, or a temperature sensor.
An SPB is not a Plug and Play bus. Peripheral devices typically have fixed connections to an SPB and cannot be
removed. Even if a peripheral device can be unplugged from a slot on an SPB, the slot is typically dedicated to
this device. During system startup, the ACPI firmware in the hardware platform enumerates the SPB-connected
peripheral devices for the Plug and Play manager, and specifies the hardware resources that are dedicated to
each device.
Included in these resources is a connection ID that identifies the device's connection to the SPB. The connection
ID encapsulates the information (for example, a bus address and a bus clock frequency) that an SPB controller
requires to establish a connection to the device. Other hardware resources might include an interrupt to which
the driver connects its ISR. However, the hardware resources for the device do not include memory for device
registers. An SPB-connected peripheral device is not memory mapped and can be accessed only through the
SPB. For more information, see Connection IDs for SPB-Connected Peripheral Devices.
An SPB provides no bus-specific means to convey interrupt requests from peripheral devices to the processor.
Instead, an SPB-connected peripheral device signals an interrupt through a separate hardware path that lies
outside of both the SPB and the SPB controller. The interrupt service routine (ISR) for an SPB-connected
peripheral device must run at IRQL = PASSIVE_LEVEL so that it can synchronously send I/O requests to serially
access the hardware registers of the device over the SPB. For more information, see Interrupts from SPB-
Connected Peripheral Devices.
Storage driver design guide
11/23/2022 • 2 minutes to read • Edit Online

Storage drivers include class, port, miniport, and filter drivers. Typically, a device vendor will implement a
miniport driver for a specific adapter or adapter type. Although not common, a new storage class can be defined
and a new class driver developed for it. Storage classes in Windows include the Disk, CDROM, USB storage, and
encrypted drive classes. Storage driver development is usually limited to writing a miniport driver to work with
the StorPort port driver.
Other types of storage drivers are secure silo drivers and Device Specific Modules (_DSM) for multipath I/O. For
storage management, WMI providers are developed as a control interface to a driver.
The storage driver design guide includes the following sections:
Roadmap for Developing Windows Storage Drivers
Roadmap for Developing Storport Miniport Drivers
Storage Drivers
Storage Class Drivers
Storage Port Drivers
Storage Miniport Drivers
Storage Virtual Miniport Drivers
Storage Filter Drivers
Crash Dump Filter Drivers
Storage Silo Drivers
CD-ROM Drivers
Tape Drivers
Changer Drivers
Storage Scenarios

Samples
Studying samples is a practical way to see how working storage drivers are developed. Sample storage drivers
are available on GitHub.

Driver Verification for StorPort


Using code analysis tools during driver development and testing helps to catch performance problems and
defects in a storage driver. The Static Driver Verifier (SDV) tool is available to discover defects in storage driver
code. Included with SDV are compliance rules for verifying proper usage of StorPort routines by miniport
drivers.
Storage Firmware Update (SFU)
11/23/2022 • 2 minutes to read • Edit Online

Storage Firmware Update (SFU) provides a reliable and authenticated method for updating firmware on NVMe
storage drives that have shipped to customers.

In this section
TO P IC DESC RIP T IO N

Storage Firmware Update (SFU) driver Provides detailed guidance on implementing SFU and the
process of creating new firmware images to be installed on
the target NVMe storage drives.
Streaming media device driver design guide
11/23/2022 • 2 minutes to read • Edit Online

Use the guidance in this section to design and implement drivers for devices that stream video and audio (for
example, webcams and digital camcorders).

New and updated content for Windows 11, version 22H2


Background segmentation portrait mode and eye gaze stare mode driver sample
KSPROPERTY_CAMERACONTROL_EXTENDED_BACKGROUNDSEGMENTATION
KSPROPERTY_CAMERACONTROL_EXTENDED_EYEGAZECORRECTION
USB Video Class (UVC) camera implementation guide

New and updated content for Windows 11


Camera privacy shutters and kill switches
Privacy shutter/switch notification
Digital Window overview
Microsoft extensions to USB Video Class 1.5 specification
Create device property keys from the MS OS descriptor in USB Video Class (UVC) camera firmware
Network camera design guide

In this section
USB Video Class (UVC) camera implementation guide
USB Video Class (UVC) driver implementation checklist
Frame Server Custom Media Source
Universal camera driver design guide for Windows 10
Device firmware update for USB devices without using a co-installer
360 camera video capture
Camera intrinsics
DShow Bridge implementation guidance for UVC devices
Camera class INF file setting for Universal camera drivers
OEM guidance on settings for the Windows 10 in-box camera app
Video stabilization registry settings
Extended camera controls
Camera driver bring up guide
Camera Device Orientation
Streaming Media Samples
AVStream Minidrivers
AVStream Property Sets
Encoder Property Sets
Encoder Events
AV/C Protocol Driver Function Codes
AV/C Streaming Protocol Driver Function Codes
AV/C Streaming Constants
Video Capture Minidriver Property Sets
Video Capture Minidriver Event Sets
Device transform manager events
Windows 2000 Kernel Streaming Model Design Guide
Kernel Streaming Proxy Plug-ins
Kernel Streaming Topology Nodes
Kernel Streaming Interface Sets
Kernel Streaming Event Sets
Kernel Streaming Method Sets
Stream Class SRB Reference
DVD Decoder Minidriver Property Sets
DVD Decoder Minidriver Event Sets
COM Interfaces
Broadcast Driver Architecture Property, Event, and Method Sets
Broadcast Driver Architecture Constants

Related sections
Streaming media DDI reference
Test Authoring and Execution Framework (TAEF)
11/23/2022 • 2 minutes to read • Edit Online

The Test Authoring and Execution Framework (TAEF) provides a consistent mechanism for developers and
testers to write and run automation. The framework provides a single infrastructure that allows them to share
tests across disciplines and teams.
Universal Serial Bus (USB)
11/23/2022 • 6 minutes to read • Edit Online

Universal Serial Bus (USB) provides an expandable, hot-pluggable Plug and Play serial interface that ensures a
standard, low-cost connection for peripheral devices such as keyboards, mice, joysticks, printers, scanners,
storage devices, modems, and video conferencing cameras. Migration to USB is recommended for all peripheral
devices that use legacy ports such as PS/2, serial, and parallel ports.
The USB-IF is a Special Interest Groups (SIGs) that maintains the Official USB Specification, test specifications
and tools.
Windows operating systems include native support for USB host controllers, hubs, and devices and systems that
comply with the official USB specification. Windows also provides programming interfaces that you can use to
develop device drivers and applications that communicate with a USB device.

USB in Windows
Windows 10: What's new for USB: Overview of new features and improvements in USB in Windows 10.
USB FAQ: Frequently asked questions from driver developers about the USB stack and features that are
supported in USB.
Microsoft OS Descriptors for USB Devices: Windows defines MS OS descriptors that allows better
enumeration when connected to system running Windows operating system.

Development tools
Download the Windows Driver Kit (WDK)

USB samples
UWP app samples for USB
Windows driver samples for USB

Create a USB driver or app for Windows


Introduces you to USB driver development. Provides information about choosing the most appropriate model
for providing a USB driver for your device.
Write a USB client driver (KMDF, UMDF )
This section includes tutorials about writing your first user-mode and kernel-mode USB drivers by using the
USB templates included with Microsoft Visual Studio.
Getting started with USB client driver development
USB device driver programming reference
Write a USB host controller driver
If you're developing an xHCI host controller that isn't compliant with the specification or developing a custom
non-xHCI hardware (such as a virtual host controller), you can write a host controller driver that communicates
with UCX. For example, consider a wireless dock that supports USB devices. The PC communicates with USB
devices through the wireless dock by using USB over TCP as a transport.
Developing Windows drivers for USB host controllers
USB host controller (UCX) reference
Ucxclass.h
Ucxcontroller.h
Ucxroothub.h
Ucxusbdevice.h
Ucxendpoint.h
Ucxsstreams.h
Write a function controller driver for a USB device
You can develop a controller driver that handles all USB data transfers and commands sent by the host to the
device. This driver communicates with the Microsoft-provided USB function controller extension (UFX).
Developing Windows drivers for USB function controllers
USB function class extension (UFX) reference
Ufxbase.h
Ufxclient.h
Ufxproprietarycharger.h
Write a USB Type -C connector driver
Windows 10 introduces support for the new USB connector: USB Type-C. You can write a driver for the
connector that communicates with the Microsoft-provided class extension module: UcmCx to handle scenarios
related to Type-C connectors such as, which ports support Type-C, which ports support power delivery.
Developing Windows drivers for USB Type-C connectors
USB connector manager class extension (UcmCx) reference
Ucmmanager.h
Write a USB dual-role controller driver
USB Dual Role controllers are now supported in Windows 10. Windows includes in-box client drivers for
ChipIdea and Synopsis controllers. For other controllers, Microsoft provides a set of programming interfaces
that allow the dual-role class extension (UrsCx) and its client driver to communicate with each other to handle
the role-switching capability of a dual-role controller.
For more information about this feature, see:
USB Dual Role Driver Stack Architecture
USB dual-role controller driver programming reference
Ursdevice.h
Write a USB driver for emulated devices
You can develop an emulated Universal Serial Bus (USB) host controller driver and a connected virtual USB
device. Both components are combined into a single KMDF driver that communicates with the Microsoft-
provided USB device emulation class extension (UdeCx).
Developing Windows drivers for emulated USB devices (UDE)
Emulated USB host controller driver programming reference
Udecxusbdevice.h
Udecxusbendpoint.h
Udecxwdfdevice.h
Udecxurb.h
WDF extension for developing USB drivers
USB connector manager class extension (UcmCx) reference
Ucmmanager.h
USB host controller (UCX) reference
Ucxclass.h
Ucxcontroller.h
Ucxroothub.h
Ucxusbdevice.h
Ucxendpoint.h
Ucxsstreams.h
USB function class extension (UFX) reference
Ufxbase.h
Ufxclient.h
Ufxproprietarycharger.h
Write a UWP app
Talk to USB devices, start to finish: Provides step-by-step instructions about implementing USB features
in a UWP app. To write such an app for a USB device, you need Visual Studio and Microsoft Windows
Software Development Kit (SDK).
Windows.Devices.Usb: UWP namespace programming reference.
Write a Windows desktop app
Write a WinUSB application: Describes how an application can call WinUSB Functions to communicate
with a USB device.
WinUSB functions
Winusb.h
Usbioctl.h
Common programming scenarios: List of common tasks that a driver or an app performs in order to
communicate with a USB device. Get quick info about the programming interfaces you need for each
task.

Testing USB devices with Windows


Overview of Microsoft USB Test Tool (MUTT) devices
Get information about the tools that you can use to test your USB hardware or software, capture traces of
operations and other system events, and observe how the USB driver stack responds to a request sent by a
client driver or an application.
Read an overview of tests in the Hardware Certification Kit that enable hardware vendors and device
manufacturers to prepare their USB devices and host controllers for Windows Hardware Certification
submission.
Other Resources for USB
Official USB Specification: Provides complete technical details for the USB protocol.
Microsoft Windows USB Core Team Blog: Check out posts written by the Microsoft USB Team. The blog
focuses on the Windows USB driver stack that works with various USB Host controllers and USB hubs
found in Windows PC. A useful resource for USB client driver developers and USB hardware designers to
understand the driver stack implementation, resolve common issues, and explain how to use tools for
gathering traces and log files.
OSR Online Lists - ntdev: Discussion list managed by OSR Online for kernel-mode driver developers.
Windows Hardware Dev Center: Miscellaneous resources based on frequently asked questions from
developers who are new to developing USB devices and drivers that work with Windows operating
systems.

USB-related videos
Understanding USB 3.0 in Windows 8
Building great USB 3.0 devices
USB Debugging Innovations in Windows 8 (Part I, II, & III)

USB hardware for learning


MUTT devices: MUTT and SuperMUTT devices and the accompanying software package are integrated
into the HCK suite of USB tests. They provide automated testing that can be used during the development
cycle of USB controllers, devices and systems, especially stress testing.
OSR USB FX2 Learning Kit: If you're new to USB driver development. The kit is the most suitable to study
USB samples included in this documentation set. You can get the learning kit from OSR Online Store.

Learn about Microsoft-provided USB drivers


USB device-side drivers in Windows: Describes the architecture of the USB function stack.
USB host-side drivers in Windows: Provides an overview of the Universal Serial Bus (USB) driver stack
architecture. Microsoft provides a core stack of drivers that interoperate with devices that are connected
to EHCI and xHCI controllers.
USB-IF device class drivers: Lists the Microsoft-provided drivers for the supported USB device classes.
Windows provides in-box device class drivers for many USB-IF approved device classes, audio, mass
storage, and so on.
USB generic function driver–WinUSB: WinUSB is a generic driver for USB devices that is included with all
versions of Windows since Windows Vista. Windows provides Winusb.sys that can be loaded as a
function driver for a custom device and a function of a composite device.
USB generic parent driver for composite devices–Usbccgp: Parent driver for USB devices with multiple
functions. Usbccgp creates physical device objects (PDOs) for each of those functions. Those individual
PDOs are managed by their respective USB function drivers, which could be the Winusb.sys driver or a
USB device class driver.
Windows Device Testing Framework (WDTF) design
guide
11/23/2022 • 2 minutes to read • Edit Online

The Microsoft Windows Device Testing Framework (WDTF) enables you to create, manage, reuse, and extend
device-centric, scenario-based automated tests.

In this section
TO P IC DESC RIP T IO N

Writing a WDTF SimpleIO plug-in for your device To get the most benefit from the Device Fundamental tests,
your device should have a Simple I/O plug-in that can
perform simple I/O to your device. This can be one of the
default Simple I/O plugs that come with WDTF or one that
you wrote. To see if your device type is supported and to
determine if there are specific requirements for testing, refer
to Provided WDTF Simple I/O plug-ins.

Writing tests with WDTF Whether you start writing driver tests with the templates
provided in the Windows Driver Kit (WDK), or whether you
create the tests on your own, the Microsoft Windows Device
Testing Framework (WDTF) enables you to create and extend
device-centric, scenario-based automated tests.

Triaging WDTF-based tests To help you better understand what is going on in your
WDTF-based tests, you can use the built-in support for
WDTF Object Logging and WPP Software Tracing.

WDTF Architecture and Overview The Microsoft Windows Device Testing Framework (WDTF)
enables you to create, manage, reuse, and extend device-
centric, scenario-based automated tests.
Windows Hardware Error Architecture (WHEA)
design guide
11/23/2022 • 2 minutes to read • Edit Online

This section describes the Windows Hardware Error Architecture (WHEA), which provides support for hardware
error reporting and recovery. In this section, the following information is provided:
An overview of WHEA and its components. For more information, see Windows Hardware Error
Architecture Overview.
How to develop and distribute platform-specific hardware error driver (PSHED) plug-ins. For more
information, see Platform-Specific Hardware Error Driver Plug-Ins.
How user-mode applications can communicate with the WHEA platform. For more information, see
Windows Hardware Error Architecture-Aware User-Mode Applications.

In this section
Introduction to the Windows Hardware Error Architecture
New Information for Windows Hardware Error Architecture
Windows Hardware Error Architecture Definitions
Windows Hardware Error Architecture Overview
Platform-Specific Hardware Error Driver Plug-Ins
Windows Hardware Error Architecture-Aware User-Mode Applications
Windows Hardware Error Architecture Debugger Extensions

Related topics
Windows Hardware Error Architecture ACPI Table Specification
Hardware Management and Security
Bug Check 0x124: WHEA_UNCORRECTABLE_ERROR (Windows Debuggers)
Windows Portable Devices
11/23/2022 • 2 minutes to read • Edit Online

In This Section
WPD Design Guide
WPD Programming Guide
WPD Reference
Windows driver samples
11/23/2022 • 2 minutes to read • Edit Online

You can browse and download individual Windows 10 driver samples on the Microsoft Samples portal. You can
also clone, fork, or download the Windows-driver-samples repo on GitHub.
Earlier versions of Windows driver samples are archived at Microsoft Archive on GitHub:
Windows 8.1 driver samples
Windows 8 driver samples
For Windows 7, samples were included in the Windows Driver Kit (WDK).

Driver samples for specific technologies


For more information about the Windows 10 driver samples available for a specific technology area, see the
following topics:
Audio driver samples
AVStream driver samples
Battery driver samples
Biometrics driver samples
Bluetooth driver samples
File system driver samples
General driver samples
General-purpose input/output (GPIO) driver samples
Global Navigation Satellite System (GNSS) driver samples
Human interface devices (HID) driver samples
Input driver samples
Networking driver samples
Near field communication (NFC) driver samples
Near field proximity (NFP) driver samples
Power framework (PoFx) driver samples
Point of service (POS) driver samples
Print driver samples
Secure Digital (SD) driver samples
Security driver samples
Sensor driver samples
Serial driver samples
Setup samples
Smart card driver samples
Simple peripheral bus (SPB) driver samples
Storage driver samples
Thermal driver samples
Tools samples
Trusted Execution Environment (TrEE) driver samples
Universal Serial Bus (USB) driver samples
Video driver samples
Windows Image Acquisition (WIA) driver samples
Windows Management Instrumentation (WMI) driver samples
Windows Portable Device (WPD) driver samples

You might also like