Windows driver kit

Windows driver kit

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Другие загрузки WDK

Комплект драйверов Windows (WDK) используется для разработки, тестирования и развертывания драйверов Windows. В этом разделе содержатся сведения о более ранних версиях комплекта драйверов Windows (WDK), Enterprise WDK (EWDK) и дополнительных загрузок в целях поддержки. Для разработки драйверов используйте последние общедоступные версии комплекта драйверов Windows (WDK) и средства, доступные для скачивания пакета драйверов Windows (WDK).

Чтобы использовать эти более ранние версии, необходимо сначала установить версию Visual Studio, подходящую для целевой платформы.

Требования к среде выполнения

Вы можете запустить версии Windows 10 WDK (включая WDK для Windows Server 2022) в Windows 7 и более поздних версиях, чтобы разрабатывать драйверы для следующих операционных систем:

ОС клиентаОС сервера
Windows 11, версия 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows Server 2008 R2 с пакетом обновления 1 (SP1)

Шаг 1. Установка Visual Studio

Для WDK требуется Visual Studio. Дополнительные сведения о требованиях к системе для Visual Studio см. в разделе «Требования к системе Visual Studio 2019».

Visual Studio 2022 не поддерживается Windows 11 версии 21H2 WDK. Чтобы использовать Visual Studio 2022 для разработки и тестирования драйверов, скачайте Windows 11 версии 22H2 WDK. Дополнительные сведения см. в разделе «Скачать комплект драйверов Windows (WDK)».

В следующей таблице указывается, какая версия Visual Studio требуется для различных выпусков WDK.

Целевые версии WindowsВыпуски Visual Studio
Windows 11, версия 21H2
Windows Server 2022
Windows 10 версии 2004
Windows 10 версии 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, версия 1809
Windows 10 версии 1803
Windows 10 версии 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10 версии 1703
Windows 10, версия 1607
Visual Studio Express 2015 для Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 с обновлением
Windows 8.1
Visual Studio 2013
Windows 8Visual Studio Professional 2012
Visual Studio Ultimate 2012

Настройка Visual Studio для Windows 11 версии 21H2 и Windows 10, версий 1709, 1803, 1809, 1903, 2004 и Windows Server 2022

Чтобы разработать драйверы для Arm/Arm64, выберите отдельные компоненты и в разделе «Компиляторы», средства сборки и среды выполнения выберите компиляторы и библиотеки Visual C++ для Arm/Arm64.

Установка пакета SDK для Windows для windows 10 версии 1607 и 1703

Если ваша разработка предназначена для систем под управлением Windows 10 версии 1607 или Windows 10 версии 1703, необходимо установить Visual Studio 2015, а затем скачать и установить версию windows SDK для целевой версии Windows 10, как показано в следующей таблице.

Целевые версии WindowsВерсия Windows SDK
Windows 10 версии 1703Windows SDK для Windows 10.0.15063.468
Windows 10, версия 1607Windows SDK для Windows 10.0.14393.795
Windows 8.1Windows SDK для Windows 8.1
Windows 8Windows SDK для Windows 8

Пакет SDK для Windows не был включен в Visual Studio 2015, поэтому необходимо установить пакет SDK отдельно. Более поздние версии Visual Studio включают windows SDK.

Шаг 2. Установка WDK

WDK интегрирован с Visual Studio и средствами отладки для Windows (WinDbg). Эта интегрированная среда предоставляет средства, необходимые для разработки, сборки, упаковки, развертывания, тестирования и отладки драйверов.

Начиная с Windows 10 версии 1709, установка WDK по умолчанию установит расширения WDK для Visual Studio. Эти расширения необходимы для интеграции WDK с Visual Studio.

Версии WindowsWDK и связанные загрузки
Windows 11, версия 21H2Windows 11 версии 21H2 WDK
Windows Server 2022WDK для Windows Server 2022
Windows 10 версии 2004WDK для Windows 10 версии 2004
Windows 10 версии 2004WDK для Windows 10 версии 2004 (10.19041.1)* См. примечание ниже
Windows 10 версии 1903WDK для Windows 10 версии 1903
Windows 10, версия 1809WDK для Windows 10 версии 1809
Windows 10 версии 1803WDK для Windows 10 версии 1803
Windows 10 версии 1709WDK для Windows 10 версии 1709
Windows 10 версии 1703WDK для Windows 10 версии 1703
Windows 10, версия 1607WDK для Windows 10 версии 1607
Windows 8.1 с обновлениемОбновление WDK 8.1 (только на английском языке) — временно недоступно
Пакет тестирования обновления WDK 8.1 (только на английском языке) — временно недоступен
Примеры WDK 8.1
Windows 8WDK 8 (только на английском языке)
Распространяемые компоненты WDK 8 (только на английском языке)
Примеры WDK 8
Windows 7WDK 7.1.0

Если вы установили WDK для Windows 10 версии 1703 в системе с WDK для Windows 10 версии 1607, некоторые файлы из более ранней версии WDK могли быть удалены. Чтобы восстановить эти файлы, выполните следующие действия.

Скачивание предыдущих версий EWDK

Enterprise WDK (EWDK) — это автономная автономная среда командной строки для создания драйверов и базовых тестовых приложений Win32. Она включает средства сборки Visual Studio, пакет SDK и WDK. Эта среда не включает все функции, доступные в Visual Studio, например интегрированную среду разработки (IDE).

Версии WindowsEWDK
Windows 11, версия 21H2Windows 11 версии 21H2 EWDK
Windows Server 2022EWDK для Windows Server 2022
Windows 10 версии 2004EWDK для Windows 10 версии 2004
Windows 10 версии 1903EWDK для Windows 10 версии 1903
Windows 10, версия 1809EWDK для Windows 10 версии 1809
Windows 10 версии 1803EWDK для Windows 10 версии 1803
Windows 10 версии 1709EWDK для Visual Studio с инструментами сборки 15.6 (рекомендуется)
EWDK для Visual Studio с инструментами сборки 15.4
EWDK для Visual Studio с инструментами сборки 15.2
Windows 10 версии 1703EWDK для Windows 10 версии 1703

Начиная с Windows 10 версии 1709, EWDK основан на ISO. Чтобы приступить к работе, скачайте и подключите ISO, а затем запустите LaunchBuildEnv.

Необязательно. Установка обновленных тестовых сертификатов для расширений HAL

Чтобы работать с расширениями HAL, подготовьте систему разработки под управлением Windows 10 версии 1709 или более поздней версии Windows 10. Кроме того, установите WDK или EWDK, а затем установите обновленную версию сертификата 2017 (TEST ONLY) oem HAL Extension Test Cert 2017 (TEST ONLY), доступную для скачивания в виде ZIP-файла: HAL_Extension_Test_Cert_2017.zip.

Дополнительные сведения об использовании этого обновленного сертификата см. в разделе «Обновление сертификата проверки расширения WINDOWS OEM HAL Cert 2017 (TEST ONLY)» в службе поддержки Windows.

Необязательно. Установка WinDbg Preview

Предварительная версия WinDbg — это новая версия WinDbg с более современными визуальными элементами, более быстрыми окнами, полноценным интерфейсом сценариев, созданным с помощью расширяемой модели данных отладчика и центра. WinDbg Preview поддерживает отладку каждой версии Windows 10.

Ссылки для скачивания и дополнительные сведения о предварительной версии WinDbg см. в разделе «Скачать Предварительную версию WinDbg».

Автономные средства для отладки Windows XP и Windows Vista

Более новые версии распространяемого компонента Visual C++ 2010 могут вызвать проблемы при установке пакета SDK для Windows 7.

Чтобы установить средства отладки для Windows в качестве автономного компонента, запустите установщик пакета SDK и в мастере установки выберите «Средства отладки для Windows» и очистите все остальные компоненты.

Установка предварительных версий пакета драйверов Windows (WDK)

На этой странице содержатся инструкции по установке За кулисами предварительных версий пакета драйверов Windows (WDK). Ссылки для скачивания для последней предварительной версии WDK и EWDK включены https://www.microsoft.com/software-download/windowsinsiderpreviewWDK.

Установка пакета драйверов Windows (WDK) За кулисами preview

1. Установка Visual Studio

2. Отключение проверки строгого имени

Расширения Visual Studio WDK в настоящее время не подписаны строгими именами. Выполните следующие команды из командной строки с повышенными привилегиями, чтобы отключить проверку строгого имени:

3. Установка пакета SDK За кулисами предварительной версии

4. Установка предварительной версии За кулисами WDK

Во время установки вы увидите, что установщик Visual Studio установит расширения Visual Studio WDK.

Установка Enterprise WDK (EWDK) За кулисами preview

В качестве альтернативы приведенным выше шагам EWDK является автономной автономной средой командной строки для создания драйверов, включающих средства сборки для Visual Studio 2022. Дополнительные сведения об установке Enterprise WDK см. в разделе «Установка Enterprise WDK».

Чтобы приступить к работе, отключите проверку строгого имени, выполнив следующие команды из командной строки с повышенными привилегиями:

Затем подключите ISO- файл, скачанный на странице предварительного просмотра За кулисами, и выберите LaunchBuildEnv, чтобы использовать EWDK.

Windows driver kit

Other WDK downloads

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.

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

[!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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK 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 Cert 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

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

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.

WDK tasks for MSBuild

The Windows Driver Kit (WDK) includes tools that are often used in the build process but are not normally distributed with Visual Studio. These tools are used to sign drivers or driver packages, implement software tracing, or to process and compile resource or message files (stampinf.exe, mc.exe, tracewpp.exe, binplace.exe, etc.). These command-line tools need to be exposed to MSBuild as tasks (contained in targets) so that they can be run during the build process. The WDK provides the necessary components so that you can run these tools as MSBuild tasks when you build your driver.

The WDK tools listed here are typically used in the build process and have MSBuild tasks, for a complete list of the tools included in the WDK and tools that are useful for driver development, see the Index of Windows Driver Kit Tools.

Tools that have WDK Tasks

The following table lists the tools and their corresponding task, target, and item names.

Tool NameTask NameTarget NameItem Name
Tracewpp.exeWppRunWppClCompile
StampInf.exeStampInfStampInfInf
Mofcomp.exeMofcompMofcompMofcomp
Wmimofck.exeWmimofckWmimofckWmimofck
mc.exeMcMessageCompileMessageCompile
Ctrpp.exeCtrppCtrppCtrpp

The following example shows how to invoke the tools.

Add and Remove Drivers to an offline Windows Image

This topic covers how to add drivers into mounted images for deployment.

When you use DISM to install a device driver to an offline image, the device driver is added to the driver store in the offline image. When the image is booted, Plug and Play (PnP) runs and associates the drivers in the store to the corresponding devices on the computer.

To add drivers to an offline image, you must use a technician computer running WindowsВ 10 or later, Windows ServerВ 2016 or later, or Windows PE for WindowsВ 10 or later. Driver signature verification may fail when you add a driver to an offline image from a technician computer running any other operating system.

Driver types

Add drivers to an offline Windows image

To add drivers to an offline image, you have to mount an image prior to adding drivers.

Mount a Windows image. For example:

Add a driver to the image.

Use DISM with the /Add-Driver option to add drivers to your mounted image:

To install a single driver— Specify the driver file:

To install all of the drivers from a folder— Point to a folder that contains drivers. To include all of the folder’s subfolders, use the `/Recurse option:

To see all DISM driver servicing command line options, see DISM driver servicing command-line options.

To install an unsigned driver— Use /ForceUnsigned to override the requirement that drivers installed on X64-based computers must have a digital signature.

Check to see if the driver was added. Drivers added to the Windows image are named Oem*.inf. This guarantees unique naming for newly added drivers. For example, the files MyDriver1.inf and MyDriver2.inf are renamed Oem0.inf and Oem1.inf.

Commit the changes and unmount the image.

Remove drivers from an offline Windows image

At an elevated command prompt on a technician PC, mount the offline Windows image:

Remove a specific driver from the image. Multiple drivers can also be removed on one command line.

Removing a boot-critical driver package can make the offline Windows image unbootable. For more information, see DISM Driver Servicing Command-Line Options.

Commit the changes and unmount the image.

Add drivers to an offline Windows image by using an unattended answer file

All drivers in the directory and subdirectories that are referenced in the answer file are added to the image. You should manage the answer file and these directories carefully to address concerns about increasing the size of the image with unnecessary driver packages.

Use WindowsВ System Image Manager (WindowsВ SIM) to create an answer file that contains the paths to the device drivers that you want to install.

If you need drivers for Windows PE to see the local hard disk drive or a network, you must use the windowsPE configuration pass of an answer file to add drivers to the Windows PE driver store and to reflect boot-critical drivers required by Windows PE. For more information, see Add Device Drivers to Windows During Windows Setup.

See Configure components and settings in an answer file for information on how to modify an answer file.

When you include multiple device driver paths by adding multiple PathAndCredentials list items, you must increment the value of Key for each path. For example, you can add two separate driver paths where the value of Key for the first path is equal to 1 and the value of Key for the second path is equal to 2.

Save the answer file and exit WindowsВ SIM. The answer file must resemble the following sample.

Mount the Windows image that you intend to install the drivers to by using DISM:

Apply the answer file to the mounted Windows image:

For more information about how to apply an answer file, see DISM Unattended Servicing Command-Line Options.

For example, type:

Header files in the Windows Driver Kit

The Windows Driver Kit (WDK) contains all the header files (.h files) that you need to build kernel-mode and user-mode drivers. Header files are in the Include folder in your WDK installation folder. Example: C:\Program Files (x86)\Windows Kits\10\Include.

The header files contain version information so that you can use the same set of header files regardless of which version of Windows your driver will run on.

Constants that represent Windows versions

Header files in the WDK contain conditional statements that specify programming elements that are available only in certain versions of the Windows operating system. The versioned elements include functions, enumerations, structures, and structure members.

To specify the programming elements that are available in each operating system version, the header files contain preprocessor conditionals that compare the value of NTDDI_VERSION with a set of predefined constant values that are defined in Sdkddkver.h.

Here are the predefined constant values that represent versions of the Microsoft Windows operating system.

WDK и Visual Studio сборки среды

Windows Driver Kit (WDK) 8,1 и WDK 8 предоставили значительные изменения в среде, используемой для создания драйвера. WDK больше не использует Build.exe. среда сборки WDK для драйверов использует MSBuild.exe и полностью интегрирована с Visual Studioной средой разработки. Это означает, что исходные файлы, Makefile. Inc, Makefile. New и другие связанные файлы сборки, имеющиеся в предыдущей версии WDK, больше не используются. Теперь WDK позволяет создавать, изменять, создавать, тестировать и развертывать драйверы с помощью Visual Studio. Цель этого документа — предоставить сведения, помогающие пользователям ознакомиться с предыдущими WDK в статье Приступая к работе с WDK 8,1 и WDK 8.

В этом разделе

в этом разделе представлено несколько базовых MSBuild терминологии для разработчиков WDK, которые знакомы с Build.exe и NMake.exe. в этом разделе показано создание простых проектов MSBuild.

Visual Studio может управлять несколькими проектами. В этом разделе описывается среда сборки WDK.

Windows Driver Kit (WDK) использует преимущества функции набора инструментов платформы MSBuild для предоставления средств и библиотек, характерных для разработки драйверов. компонент набора инструментов платформы MSBuild является расширяемым. конкретная версия набора инструментов платформы, которую вы хотите использовать, управляется свойством MSBuild с именем PlatformToolset. Проекты могут переключаться между инструментами и библиотеками путем задания свойства PlatformToolset в файле проекта.

вкладки свойств драйвера имеют параметры по умолчанию для всех средств, которые MSBuild использует для построения любого проекта драйвера.

Файлы Виндовсдривер. Common. targets, Виндовсдривер. MASM. targets и Виндовсдривер. ARM. targets предоставляют целевые объекты, необходимые для создания драйвера.

По умолчанию WDK использует макрос промежуточного каталога $ (IntDir) для указания выходного каталога сборки по умолчанию.

Преобразование проектов WDK 8,1 в WDK 10

в этом разделе описывается преобразование проекта драйвера, созданного с помощью Microsoft Visual Studio 2013 и Windows driver Kit (WDK) 8,1, в проект драйвера, который строится в Microsoft Visual Studio 2015 с помощью Windows driver kit (WDK) 10.

Visual Studio 2015 содержит новые предупреждения и ошибки компилятора. даже если проект драйвера создан без ошибок в Visual Studio 2013, при его сборке в Visual Studio 2015 могут возникнуть ошибки.

Чтобы преобразовать проекты в решении для работы с драйверами, выполните следующие действия.

в Visual Studio 2015 откройте устаревшее решение драйверов.

Visual Studio автоматически запускает прожектупградетул для преобразования проектов в этом решении. Это средство также можно запустить из командной строки. по умолчанию при установке WDK ProjectUpgradeTool.exe устанавливаются в Windows Kits\10\bin\x86.

В версиях WDK, предшествовавших версии для WDK 10, решение драйвера всегда потребовало проекта пакета. В WDK 10 необходим проект пакета, только если в пакет драйверов входит несколько драйверов. Придерживайтесь приведенных ниже рекомендаций.

Если в решении имеется только один драйвер, а проект пакета существует, удалите его.

Если в решении имеется более одного драйвера, убедитесь, что решение содержит проект пакета. затем для каждого проекта драйвера в решении откройте свойства проекта и выберите свойства > конфигурации драйвер Параметры. Задайте для буилдпаккаже значение нет. Если выполняется сборка из командной строки, установите параметр /p: суппортспаккагинг = false.

В свойствах проекта драйвера щелкните Свойства. перейдите к свойствам > конфигурации драйвер Параметры > общая > целевая версия ос. Выберите Windows 10.

Убедитесь, что для параметра Целевая платформа задано значение Рабочий стол, и создайте решение. Исправьте все возникшие ошибки.

После успешного построения решения измените целевую платформу на универсальную.

Выполните повторную сборку решения. На этом этапе единственными ошибками являются средства Апивалидатор, которые проверяют, вызывает ли драйвер какие-либо неуниверсальные функции. Замените все вызовы неуниверсального ДДИС вызовами универсального ДДИС.

дополнительные сведения о апивалидатор см. в разделе проверка драйверов универсального Windows.

Сведения о том, как определить целевую платформу для конкретного DDI, см. в разделе Целевая платформа на страницах справочника по драйверам.

Простейший WDM-драйвер

В данной статье описан процесс написания простейшего драйвера, который выводит скан-коды нажатых клавиш.
Также в данной статье описан процесс настройки рабочего места для написания драйверов.
Если Вам интересно, прошу под кат.

Подготовка стенда

Установка необходимого ПО для написания простейшего драйвера
Настройка рабочего места
Установка DDK

Установка предельно проста. Единственное на что необходимо обратить внимание — это диалог, в котором Вам предлагается выбрать компоненты, которые будут установлены. Настоятельно рекомендую отметить всю документацию и примеры.

Установка и настройка Microsoft® Visual Studio 2005
Установка и настройка DDKWizard
Установка необходимого ПО для запуска драйверов

Постановка задачи

Задача: написать драйвер, который будет выводить в дебаг скан-коды нажатых клавиш и их комбинаций.

Немного теории

IRP — это структура, которая используется драйверами для обмена данными.

Отличия между верхними и нижними фильтрующими драйверами

Через верхние фильтрующие драйверы проходят все запросы, а это значит, что они могут изменять и/или фильтровать информацию, идущую к функциональному драйверу, ну и далее, возможно, к устройству.
Пример использования верхних фильтрующих драйверов:
Фильтр-хук драйвер, который устанавливает свою хук-функцию для системного драйвера IpFilterDirver, для отслеживания и фильтрации траффика. Такие драйверы используются в брандмауэрах.

Через нижние фильтрующие драйверы проходит меньше запросов потому что большинство запросов выполняет и завершает функциональный драйвер.

Проблемы синхронизации

В драйвере, который мы будем писать, есть несколько «проблемных» секций. Для нашего драйвера вполне достаточно использования ассемблерных вставок:

Префикс lock позволяет безопасно выполнить идущую за ним команду. Она блокирует остальные процессоры, пока выполняется команда.

Экшен

Для начала необходимо включить заголовочные файлы «ntddk.h», «ntddkbd.h»

Также необходимо описать структуру DEVICE_EXTENSION

Объект pLowerDO это объект устройства, который находится ниже нас в стеке. Он нужен нам для того чтобы знать кому дальше отправлять IRP-пакеты.
Еще для работы нашего драйвера нам нужна переменная, в которой будет храниться количество не завершенных запросов.

Начнем с функции, которая является главной точкой входа нашего драйвера.

theDriverObject – объект драйвера, содержит указатели на все необходимые операционной системе функции, которые мы должны будем инициализировать.
ustrRegistryPath – имя раздела в реестре, где хранится информация о данном драйвере.
Для начала необходимо объявить и обнулить переменные:

Далее, как я и писал выше, нужно инициализировать указатели на функции

Функция DispatchRead будет обрабатывать запросы на чтение. Она будет вызываться, когда нажата или отпущена клавиша клавиатуры.
Функция DriverUnload вызывается, когда драйвер уже не нужен и его можно выгрузить из памяти, или когда пользователь сам выгружает драйвер. В данной функции должна производиться «зачистка», т.е. освобождаться ресурсы, которые использовались драйвером, завершаться все незавершенные запросы и т.д.
Функция DispatchThru это функция-заглушка. Все что она делает это передача IRP-пакета следующему драйверу (драйверу который находится под нашим в стеке, т.е. pLowerDO из DEVICE_EXTENSION ).
Далее мы вызываем нашу функцию, для создания и установки нашего устройства в стек устройств:

Эта функция создает объект устройства, настраивает его и включает в стек устройств поверх \\Device\\KeyboardClass0

pKeyboardDevice – это объект устройсва, которое мы должны создать.
Вызываем IoCreateDevice для создания нового устройства

Флаги, которые мы устанавливаем для нашего устройства, должны быть эквивалентными флагам устройства, поверх которого мы включаемся в стек.
Далее мы должны выполнить преобразования имени устройства, которое мы включаем в стек.

Функция IoAttachDevice внедряет наше устройство в стек. В pdx->pLowerDO будет храниться объект следующего (нижнего) устройства.

Далее разберем функцию DispatchRead с прототипом:

Данная функция будет вызываться операционной системой при нажатии или отпускании клавиши клавиатуры
Увеличиваем счетчик незавершенных запросов

Перед тем как передать запрос следующему драйверу мы должны настроить указатель стека для драйвера. IoCopyCurrentIrpStackLocationToNext копирует участок памяти, который принадлежит текущему драйверу, в область памяти следующего драйвера.
Когда запрос идет вниз по стеку в нем еще нет нужных нам данных, поэтому мы должны задать функцию, которая вызовется, когда запрос будет идти вверх по стеку с нужными нам данными.

где ReadCompletionRoutine наша функция.
Передаем IRP следующему драйверу:

Структура PKEYBOARD_INPUT_DATA используется для описания нажатой клавиши.

Проверяем, удачно завершен запрос или нет

Узнаем количество клавиш

И выводим каждую клавишу:

И не забываем уменьшать количество не обработанных запросов

Возвращаем статус запроса

Разберем функцию завершения работы. Прототип:

Извлекаем устройство из стека:

Проверяем есть незавершенные запросы или нет. Если мы выгрузим драйвер без этой проверки, при первом нажатии на клавишу после выгрузки будет БСоД.

Как запустить драйвер и просмотреть отладочную информацию

Для запуска драйвера я использовал утилиту KmdManager. Для просмотра отладочной информации использовалась утилита DbgView.

P. S. Статью писал давно, ещё на третьем курсе, сейчас уже почти ничего не помню. Но если есть вопросы, постараюсь ответить.
P. P. S. Прошу обратить внимание на комментарии, в частности на этот

Показать образцы

начиная с Windows 8, примеры доступны для загрузки из Центр разработки оборудования. для Windows 7 и более ранних версий примеры и документация были добавлены в комплект Windows Driver kit (WDK) или в комплект средств разработки драйверов (DDK).

доступно в Центр разработки оборудования.

реализует большинство интерфейсов драйверов устройств (ддис), которые должны предоставляться драйвером мини-порта только для просмотра для модели Windowsного драйвера (WDDM).

доступно в Центр разработки оборудования.

Windows 8 Windows 7 Windows server 2008 Windows Vista Windows server 2003 Windows XP

Windows 8 Windows 7 Windows server 2008 Windows Vista Windows server 2003 Windows XP

Драйвер зеркального отображения для зеркального отображения содержимого GDI

Windows 7 Windows server 2008 Windows Vista Windows server 2003 Windows XP Windows 2000

Windows 7 Windows server 2008 Windows Vista Windows server 2003 Windows XP Windows 2000

Демонстрирует драйвер, выполняющий зеркальное отображение видео.

Windows 7 Windows Server 2008 Windows Vista

Windows 7 Windows Server 2008 Windows Vista

Демонстрирует, как производители мониторов могут избежать мигания памяти EEPROM монитора, реализовав INF-файл монитора, который переопределяет часть или всю информацию EDID в программном обеспечении.

Новые возможности разработки драйверов для Windows 11 версии 22H2

В этом разделе описываются новые функции и обновления для разработки драйверов в Windows 11 версии 22H2.

Документация по ACPI была обновлена с новыми строковыми сведениями _OSI для Windows 11 версии 22H2.

Драйверы мультимедиа для камеры и потоковой передачи

Документация по драйверу камеры была обновлена с информацией о режимах сегментации фона и взгляда, доступных в Windows 11 версии 22H2.

Безопасность драйвера

Драйверы файловой системы и фильтров

Возможность выполнять доверенное копирование файлов в режиме ядра появилась в Windows 11 версии 22H2. Эта функция включает возможность фильтров легко обнаруживать сценарии копирования.

Широкополосное мобильное подключение

Windows 11 версии 22H2 представлены следующие функции мобильной широкополосной связи:

Выпуск расширений MBIM версии 4.0 (MBIMEx 4.0) предоставляет поддержку функций этапа 2 5G SA. Набор компонентов 5G SA Phase 2 включает поддержку комплексной обработки URSP и нескольких параллельных срезов сети eMBB.

Errata для MBIMEx 3.0 обновляет исходную спецификацию MBIMEx 3.0.

Печать приложений устройств

Руководство по проектированию приложения поддержки печати (PSA) обновлено с информацией о новых функциональных возможностях PSA, доступных начиная с Windows 11 версии 22H2.

Поддержка подготовки для загрузки предварительных драйверов

Средства отладки Windows

Средство записи WPP

Драйверы могут добавлять метки времени в записи журнала inflight Trace Recorder (IFR). Метки времени могут указывать миллисекунд или десятую часть микросекунды детализации.

Связанные разделы

Сведения о новых возможностях драйверов в предыдущих выпусках Windows см. на следующих страницах:

файлы свойств, относящиеся к драйверу Windows

вкладки свойств драйвера имеют параметры по умолчанию для всех средств, которые MSBuild использует для построения любого проекта драйвера.

в следующей таблице перечислены эти страницы свойств и их использование в терминах параметров по умолчанию, которые MSBuild использует для построения различных драйверов.

$ (Вдкконтентрут) \буилд будет иметь все основные расширения сборки, необходимые для создания драйвера.

Виндовсдривер. Common. props
Общие параметры, необходимые для создания всех драйверов — как в режиме ядра, так и в пользовательском режиме.

Виндовсдривер. Shared. props
Этот файл свойств содержит общие параметры сборки, необходимые для построения приложения, а также драйвера. Этот файл используется во всех наборах инструментов WDK, например Виндовскернелмодедривер 8.1, Виндовсусермодедривер 8.1 и Виндовсаппликатионфордриверс 8.1.

Виндовсдривер. значение kernelmode. props
Этот файл свойств имеет общие параметры, необходимые для сборки только двоичных файлов в режиме ядра. Иными словами, эти параметры не применяются к драйверам и приложениям пользовательского режима.

Виндовсдривер. значение kernelmode. Driver. props
Этот файл свойств импортирует определенные файлы PROPS типа драйвера режима ядра (например, Виндовсдривер. 8.1. значение kernelmode. КМДФ. props).

Виндовсдривер. Лативалуатион. props
Только для внутреннего использования. Не изменяйте и не используйте.

Виндовсдривер. MASM. props
Эти параметры свойств содержат параметры для создания файлов сборок (MASM) для поддерживаемых архитектур (платформ).

Виндовсдривер. пользовательского режима. свойства
Эти параметры свойств являются общими параметрами, необходимыми для создания любого драйвера пользовательского режима. Иными словами, не применяйте эти параметры для драйверов и приложений режима ядра.

Building a Windows driver

You can use Microsoft Visual StudioВ 2019 in conjunction with the Windows Driver Kit (WDK) Version 2004 to build Windows Drivers. You can download kits and tools from the Windows Hardware Dev Center.

In many cases, you can recompile a legacy kernel-mode driver as a Windows Driver, as long as the driver does not work with any user-mode components. Legacy WDM and KMDF drivers should recompile as Windows Drivers targeting WindowsВ 10 with no conversion required. While the drivers may compile without any conversion, this does not mean that the driver meets all of the Windows Drivers requirements. Please see Getting Started with Windows Drivers for details regarding Windows Drivers requirements.

In contrast, existing user-mode drivers may require modification to compile as Windows drivers. Specifically, your driver package must not have any dependencies outside of UWP. For example, only some of the Win32 APIs are part of UWP.

Converting an existing driver project to a Windows driver project

Creating a New Windows Driver Project in Microsoft Visual Studio

Create a new driver from a template (File->New Project->Create New Project->Project Type->Driver->Select the template of interest).

After you create the project, in the Solution Explorer pane, select and hold (or right-click) the solution and choose Configuration Manager. Set Active solution configuration to the desired target Windows version, and set Active solution platform to Win32 or x64. If Arm is not listed, choose to build for Arm.

If you choose WindowsВ 10, the driver model defaults to Universal.

To change driver model manually, select and hold (or right-click) the driver project and choose Properties. Under Configuration Properties->Driver Settings->General, find the Target Platform entry. Choose Windows Driver. Microsoft Visual Studio uses this setting to determine what libraries to link against.

NoteВ В You cannot build a Windows Driver for Windows versions earlier than WindowsВ 10 Version 1809.

Creating a New Universal Application or DLL Project in Microsoft Visual Studio

For information about the configuration settings you can use in Visual Studio when building your driver, see Building a Driver with the WDK.

Разработка, тестирование и развертывание драйверов

среда разработки драйвера Windows и отладчики Windows интегрированы в Microsoft Visual Studio. в этой интегрированной среде разработки драйверов большинство средств, необходимых для программирования, сборки, упаковки, развертывания и тестирования драйвера, доступны в Visual Studio пользовательском интерфейсе.

чтобы настроить интегрированную среду разработки, сначала установите Visual Studio а затем установите WDK. сведения о том, как получить Visual Studio и WDK можно найти на странице установка и загрузка wdk. средства отладки для Windows включены в установку WDK.

WDK использует MSBuild.exe, который доступен как в Visual Studio пользовательском интерфейсе, так и в виде программы командной строки. драйверы, созданные в среде Visual Studio, используют файлы Project и решений для описания проекта или группы проектов. среда Visual Studio предоставляет средство для преобразования устаревших источников и файлов Dirs в файлы Project и решений.

среда Visual Studio предоставляет шаблоны для:

в среде Visual Studio можно настроить процесс сборки таким образом, чтобы он автоматически создавал и подписывает пакет драйверов. В Visual Studio доступны статические инструменты и средства анализа времени выполнения. Можно настроить конечный компьютер для тестирования драйвера и автоматически развертывать драйвер на целевом компьютере при каждом перестроении. Вы можете выбрать один из широкого набора тестов времени выполнения, а также написать собственные тесты.

в подразделах этого раздела показано, как использовать Visual Studio для выполнения нескольких задач, связанных с разработкой, развертыванием и тестированием драйверов.

Дополнительные видеоролики

видео можно найти на следующих страницах документации по драйверу Windows:

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Общие сведения о наборах и средствах

Эти комплекты и инструменты доступны для использования с Windows 11 для классических выпусков (домашняя версия, Pro, Enterprise и образование) для разработки и производства.

ADK для Windows 11

Скачайте Windows ADK для установки средств и документации для изготовителей оборудования и ODM для настройки Windows 11 образов, оценки качества и производительности систем или компонентов, а также для развертывания Windows операционных систем на новых компьютерах. В Windows ADK есть конструктор конфигураций Windows, набор средств оценки Windows, набор средств для Windows производительности и несколько новых и улучшенных средств развертывания, которые помогут автоматизировать крупномасштабное развертывание Windows 10. Дополнительные сведения см. в статье «Новые возможности» в комплектах и средствах.

Сведения о средствах ADK

В следующих разделах приведены инструкции по использованию средств, включенных в Windows 10 ADK:

Microsoft Visual Studio;

Начните с скачивания последней версии Visual Studio и средств Microsoft Visual Studio. Используется вместе, Microsoft Visual Studio, Инструменты Visual Studio для Windows 10, Windows автономный пакет средств разработки программного обеспечения (SDK) для Windows 11 и Windows Комплект драйверов (WDK) предоставляет интегрированную среду разработки для создания эффективных высококачественных драйверов для устройств, работающих Windows 10.

Набор драйверов для Windows

WDK 10 содержит средства для сборки, тестирования, отладки и развертывания драйверов для Windows 11. WDK объединяет поддержку мобильных и настольных устройств, универсальных драйверов Windows и, с Visual Studio, обеспечивает унифицированный интерфейс тестирования с надежной подготовкой развертывания и отладки, которая включает WinDbg. Вы можете выполнять множество базовых тестов сертификации в интегрированной среде. WDK 10 включает шаблоны для нескольких технологий и моделей драйверов, включая Windows платформы драйверов (WDF), универсальную последовательную шину (USB), печать, сеть и фильтры файловой системы. WDK 10 также поддерживает разработку драйверов Windows 7, Windows 8, Windows 8.1 и Windows 10.

Enterprise WDK (EWDK)

Enterprise WDK (EWDK) — это комплект, который крупные организации могут использовать в качестве альтернативы загрузке и установке пакета SDK и WDK по отдельности на каждом компьютере. EWDK имеет среду сборки командной строки, основанную на файлах и не зависящую от компьютера, поэтому после создания структуры файла среды ее можно распространить для прямого использования, например с помощью программного обеспечения управления версиями или запаковки содержимого и распаковки на других компьютерах. Он содержит необходимые элементы для создания драйверов Windows модели драйвера (WDM), драйверов WDF и классических Windows тестовых приложений.

символы Windows

Файлы символов упрощают отладку кода. Самый простой способ получить Windows символы — использовать сервер символов Майкрософт. Если вы предпочитаете скачать весь набор символов для определенной версии Windows, скачайте пакет символов.

Windows комплект аппаратных лабораторий (HLK)

Пакет Windows Hardware Lab Kit (HLK) — это комплект всех целей для тестирования и измерения, помогающий определить, насколько хорошо оборудование взаимодействует с Windows. HLK предоставляет тестовую инфраструктуру для компьютеров. Дополнительные сведения об использовании HLK с Windows 10 см. в руководстве пользователя Windows Hardware Lab Kit.

Содержимое дополнительного теста HLK

Для некоторых тестов, таких как графические и мультимедийные тесты, требуются дополнительные файлы для тестирования. Это содержимое можно найти в разделе Windows дополнительного содержимого теста мультимедиа HLK на странице скачивания Windows HLK, HCK или логотипа Kit.

Windows Hardware Dev Center

Design, develop, and deploy hardware and device drivers for Windows PCs and other devices.

Get the latest hardware development kits and tools

Windows Driver Kit

The Windows Driver Kit (WDK) is used to develop, test, and deploy Windows drivers. Download the latest public version here or join the Insider Program to get access to insider builds.

Windows driver kit. . Windows driver kit фото. Windows driver kit-. картинка Windows driver kit. картинка . 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).

Windows Hardware Lab Kit

The Windows Hardware Lab Kit (HLK) is used to validate hardware and drivers for Windows compatibility. Download the latest public version here or join the Insider Program to get access to insider builds.

Windows driver kit. . Windows driver kit фото. Windows driver kit-. картинка Windows driver kit. картинка . 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).

Windows Assessment and Deployment Kit

The Windows Assessment and Deployment Kit (ADK) is used to customize, deploy and benchmark Windows 10 images. Download the latest public version here or join the Insider Program to get access to insider builds.

Windows driver kit. . Windows driver kit фото. Windows driver kit-. картинка Windows driver kit. картинка . 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).

Windows Debugging Tools

The Windows Debugger (WinDbg) can be used to debug kernel and user mode code, analyze crash dumps and to examine the CPU registers as code executes. Download the latest public version here or join the Insider Program to get access to insider builds.

Latest news and communities

Windows Hardware Dev Center blog

Get the latest driver portal changes, signing requirements, and feature enhancements.

Windows Hardware Certification blog

Find information about the Windows Hardware Certification program.

WinHEC Online

Join the tech community for Windows hardware manufacturers.

Intelligent Edge Resource Center

Find everything Microsoft provides to help you build for IoT and the Intelligent Edge.

AI@Edge community

Use Microsoft’s Intelligent Edge tools to quickly move from pencil sketch to deployment.

IoT Devices tech community

Join the tech community for IoT and Intelligent Edge hardware manufacturers.

Windows Hardware Lab Kit

Комплект лабораторий оборудования Windows (Windows HLK) — это платформа тестирования, используемая для тестирования аппаратных устройств и драйверов для Windows 11, Windows 10 и всех версий сервера Windows, начиная с Windows Server 2016. Чтобы претендовать на Windows программу совместимости оборудования, продукт должен пройти определенные тесты с помощью Windows HLK.

В этом руководстве содержатся сведения о тестах, включенных в пакет оборудования Windows Hardware Lab Kit, а также инструкции по созданию тестовой среды, автоматизации драйверов и системного тестирования, а также созданию пакета отправки, необходимого для участия в программе совместимости оборудования Windows.

При разработке для Windows 11 Windows 10 или полных версий сервера Windows необходимо использовать правильную версию HLK, как указано в следующей таблице. Использование правильного комплекта помогает убедиться, что драйверы и разрабатываемая система сертифицированы как совместимые с Windows 11, Windows 10 или сервером Windows.

Сертифицировать с помощью Виртуального HLK (VHLK)! VHLK — это все предустановленное и предварительно настроенное на VHDX комплект оборудования, готовое к загрузке в качестве виртуальной машины. Используйте VHLK, чтобы сэкономить время установки, быстро встать на контроллер и запустить Windows сертификации оборудования с виртуальной машины.

Имя примераСреда сборкиЦелевая операционная системаДрайвер PnPДрайвер в BoxПример описания
Чтобы сертифицировать.Скачать.
Windows 11 версии 22H2Windows 11 HLK 22H2 или
Virtual HLK (VHLK) для Windows 11 версии 22H2
Windows 11, версия 21H2Windows 11 HLK 21H2 или
Virtual HLK (VHLK) для Windows 11 версии 21H2
Windows Server 2022Windows HLK для Windows Server 2022 или
Virtual HLK (VHLK) для Windows Server 2022
Windows 10 версии 21H2, Windows 10 версии 21H1, Windows 10 версии 20H2,
Windows 10 версии 2004
Windows HLK для Windows 10 версии 2004 или
Virtual HLK (VHLK) для Windows 10 версии 2004
Windows 10, версия 1909
Windows 10 версии 1903
Windows HLK для Windows 10 версии 1903 или
Virtual HLK (VHLK for Windows 10), версия 1903
Windows 10, версия 1809, Windows Server 2019Windows HLK версии 1809 или
Virtual HLK (VHLK) для Windows 10, версия 1809
Windows 10 версии 1803Windows HLK для Windows 10 версии 1803
Windows 10 версии 1709Windows HLK для Windows 10 версии 1709
Windows 10 версии 1703
Windows 10, версия 1607
Windows HLK для Windows 10 версии 1703
Windows 10 версии 1511
Windows 10 версии 1507
Windows Server 2016
Windows HLK для Windows 10 версии 1607

Windows HLK поддерживает только тестирование версий сервера Windows 11, Windows 10 и Windows Server, начиная с Windows Server 2016. Для тестирования предыдущих версий Windows используйте комплект сертификации оборудования для Windows 8.1.

программа совместимости оборудования Windows

Чтобы претендовать на Windows программу совместимости оборудования, продукт должен пройти определенные тесты с помощью Windows HLK. Инструкции по использованию комплекта для сертификации совместимости см. в Windows программе совместимости оборудования и блоге по сертификации оборудования Windows.

Сертификация для Windows Server 2016, Azure Stack, SDDC и более поздних версий этих программ и квалификаций должна соответствовать Windows требованиям к совместимости оборудования, как указано в соответствующей версии документации; должна использовать соответствующую версию HLK с соответствующим списком воспроизведения и дополнительным содержимым для создания журналов; и должны следовать политикам, как указано в разделе Windows документ политики сервера. Вопросы о программах Azure Stack, SDDC или отправке результатов для проверки решения должны направляться соответствующему менеджеру технической учетной записи Майкрософт или контакту по управлению партнерами.

Скачивание списка воспроизведения Windows совместимости оборудования

Получите официальный список воспроизведения Windows совместимости оборудования, чтобы можно было запустить тесты Windows HLK, которые обеспечивают соответствие оборудования требованиям к совместимости с Windows 11, Windows 10 и сервером Windows.

Скачивание Windows фильтров HLK

Если в тесте HLK Windows или в самой операционной системе возникает проблема, которая приводит к неправильному сбою сертификационных тестов, мы создадим ошибку, которая позволяет партнерам обойти проблемный тест. Большинство errata используют фильтры для автоматической фильтрации сбоя из результатов отправки. Фильтры применяются в Windows HLK Studio.

Скачивание содержимого дополнительного теста HLK Windows

Дополнительное содержимое для мультимедиа, графики, среднее время между сбоями (MTBF) и тестами симулятора частного облака

Для некоторых тестов, связанных с графикой, мультимедиа и средним временем между сбоями (MTBF), требуются дополнительные загрузки содержимого теста. Скачайте эти файлы, чтобы завершить тестирование HLK Windows в этих областях.

Необходимые загрузки для тестов, использующих дополнительное содержимое:

Мультимедиа

Графика

Начиная с Windows HLK версии 2004 пакет HLK_GRFX_FOD больше не требуется для тестирования графики. Он по-прежнему необходим для тестирования предыдущих версий Windows (Windows 10, версий 1909 и более ранних версий).

Мобильные службы

Скачивание автономной документации по HLK

Эта документация также доступна в формате CHM для автономного использования.

Подготовка компьютера для развертывания и тестирования драйверов (WDK 10)

Подготовка целевого или тестового компьютера — это процесс настройки компьютера для автоматического развертывания, тестирования и отладки драйверов. Для подготовки компьютера используйте Microsoft Visual Studio.

Среда тестирования и отладки имеет два компьютера: главный компьютер и целевой компьютер. Целевой компьютер также называется тест-компьютером. Вы разрабатываете и создаете драйвер в Visual Studio на хост-компьютере. Отладчик работает на хост-компьютере и доступен в пользовательском интерфейсе Visual Studio. При тестировании и отладке драйвера драйвер выполняется на целевом компьютере.

Узел и целевые компьютеры должны иметь возможность ping друг друга по имени. Это может быть проще, если оба компьютера присоединены к одной рабочей группе или одному сетевому домену. Если компьютеры находятся в рабочей группе, рекомендуется подключить компьютеры к маршрутизатору, а не к концентратору или коммутатору.

Рекомендуется запускать одну и ту же версию Windows для узла и целевого объекта.

Подготовка целевого компьютера к подготовке

На целевом компьютере установите операционную систему, которую вы будете использовать для запуска и тестирования драйвера.

Установите WDK. Однако вам не нужно устанавливать Visual Studio, если вы не планируете разрабатывать драйверы на целевом компьютере.

Если на целевом компьютере x86 или x64 включена безопасная загрузка, отключите ее. Сведения о едином расширяемом интерфейсе встроенного ПО (UEFI) и безопасной загрузке см. в разделе встроенного ПО UEFI.

Если на целевом компьютере используется процессор Arm, установите политику отладки Windows. Это можно сделать только корпорацией Майкрософт или производителем целевого компьютера. Вам не нужно отключать безопасную загрузку.

На целевом компьютере запустите MSI-файл установки тестового целевого объекта WDK, соответствующий платформе целевого компьютера. MSI можно найти в каталоге установки пакета драйверов Windows (WDK) в разделе Remote.

Пример: C:\Program Files (x86)\Windows Kits\10\Remote\x64\WDK Test Target Setup x64-x64_en-us.msi

Если на целевом компьютере установлена версия N или KN Windows, установите пакет дополнительных компонентов носителя для версий N и KN Windows:

Если целевой компьютер работает под управлением Windows Server, найдите папку DriverTest, созданную msi-файлом установки тестового целевого объекта WDK. (Пример: c:\DriverTest). Выберите и удерживайте (или щелкните правой кнопкой мыши) папку DriverTest и выберите пункт «Свойства«. На вкладке «Безопасность » предоставьте разрешение «Изменить » группе «Пользователи, прошедшие проверку подлинности «.

Убедитесь, что узел и целевые компьютеры могут проверять связь друг с другом. Откройте окно командной строки и введите pingComputerName.

Если узлы и целевые компьютеры присоединены к рабочей группе и находятся в разных подсетях, может потребоваться настроить некоторые параметры брандмауэра, чтобы узлы и целевые компьютеры могли обмениваться данными. Выполните следующие действия:

Подготовка целевого компьютера

Теперь вы готовы подготовить целевой компьютер с главного компьютера в Visual Studio.

На хост-компьютере в Visual Studio выберите меню «Расширения», наведите указатель мыши на драйвер, наведите указатель на пункт «Тест» и выберите «Настроить устройства«.

В диалоговом окне «Настройка устройств » выберите » Добавить новое устройство«.

В качестве имени узла сети введите имя или локальный IP-адрес целевого компьютера. Выберите «Подготовка устройства» и выберите параметры отладчика.

Windows driver kit. vs2019 device configuration. Windows driver kit фото. Windows driver kit-vs2019 device configuration. картинка Windows driver kit. картинка vs2019 device configuration. 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).

Выберите Далее.

Выберите тип подключения отладки и введите необходимые параметры.

Дополнительные сведения о настройке отладки для различных типов подключений см. в разделе «Настройка отладки сетевого ядра KDNET вручную» и в соответствующей документации по средствам отладки для Windows.

Процесс подготовки занимает несколько минут и может автоматически перезагрузить целевой компьютер один или два раза. После завершения подготовки нажмите кнопку «Готово«.

Подготовка виртуальных машин через процесс автоматической подготовки WDK не поддерживается. Однако вы можете протестировать драйверы на виртуальной машине, настроив целевую виртуальную машину вручную, как описано в пошаговой лаборатории эхо.

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Installing the WDK 8.1 Build Environment in a Lab

The Windows Driver Kit (WDK)В 8.1 provides a feature that enables you to copy components of Visual Studio and the WDK to a new location and then launch the build environment from the command line. From here you can build Windows drivers without having to run the Visual Studio or WDK installation programs.

You might find this feature useful if you need to integrate the WDK with your build process, or if you want to distribute the build process in a lab or test environment.

NoteВ В You can only use this feature for building drivers and applications that use C and C++. This feature cannot be used for managed code or UWP apps.

1. Download the Visual Studio and WDK and SDK setup files

To run the set up script that enables this feature, you need to provide the paths to the Visual Studio and WDK setup files. Be sure to save these files (rather than install them).

2. Download the BuildLabSupport files

To be able install the WDK build environment on computers in a lab, you need to first download the build lab support files on your computer.

3. Install the WDKВ 8.1 build environment

The build lab support files include the setup.ps1 PowerShell command file, which extracts the needed Visual Studio and WDK components and copies them to a target directory (folder). You can then copy this directory to another location, from which you can build projects in a Visual Studio command-line interface (CLI) development environment.

Open a Command Prompt window with elevated privileges (Run as administrator) and go to the directory where you extracted build lab support files. The PowerShell command script setup.ps1 is in the \BuildLabSupport directory.

The syntax for the PowerShell command is as follows:

For example, the following command runs the script from BuildLabSupport directory and installs the build environment in C:\BuildLabInstall directory.

4. Build Windows driver projects and solutions

Using the build environment command script

Open a Command Prompt window. Locate the LaunchBuildEnv.cmd file located in the target directory (for example, C:\BuildLabInstall).

Launch the build environment by running LaunchBuildEnv.cmd.

Use MSBuild commands to build your driver projects and solutions. For example:

Getting Started with ‘Windows Drivers’

When you write a driver to run on the Windows operating system, you have two basic choices. You can write a Windows Desktop driver, which only runs on Windows Desktop editions. Or, you can meet a few extra requirements and write a Windows Driver, which runs on both Desktop and non-Desktop variants of Windows. The Windows Driver classification extends and replaces the older Universal Driver classification.

The following additional requirements apply to Windows Drivers:

The following table summarizes the distinctions between the two classifications:

FeatureWindows DriversWindows Desktop Drivers
Runs on Windows DesktopYesYes
Runs on non-Desktop variants of WindowsYesNo
Must be certified with WHCPYesNo
WDK & HLK are primary vehicles for developing and certifying driversYesYes
Adhere to stricter reliability and serviceability requirements (e.g. driver package isolation)YesNo

While it’s not required for a driver running only on Windows Desktop to meet the additional requirements for a Windows Driver, doing so enhances driver serviceability and reliability, and also prepares the driver for possible future certification on non-Desktop variants of Windows.

Задачи WDK для MSBuild

комплект драйверов Windows (WDK) включает средства, которые часто используются в процессе сборки, но обычно не распространяются с Visual Studio. Эти средства используются для подписывания драйверов или пакетов драйверов, реализации трассировки программного обеспечения, а также для обработки и компиляции файлов ресурсов или сообщений (stampinf.exe, mc.exe, tracewpp.exe, binplace.exe и т. д.). эти программы командной строки должны быть доступны для MSBuild как задачи (содержащиеся в целевых объектах), чтобы их можно было запускать в процессе сборки. WDK предоставляет необходимые компоненты, чтобы можно было запускать эти средства как MSBuild задачи при сборке драйвера.

перечисленные здесь средства wdk обычно используются в процессе сборки и содержат MSBuild задачи. полный список средств, включенных в WDK и средствах, которые полезны для разработки драйверов, см. в статье индексирование Windows средств набора драйверов.

Средства, имеющие задачи WDK

В следующей таблице перечислены средства и соответствующие им имена задач, целевых объектов и элементов.

Имя средстваИмя задачиИмя целиИмя элемента
Tracewpp.exeПубликациирунвппClCompile
StampInf.exeстампинфстампинфФайлу
Mofcomp.exeMofcompMofcompMofcomp
Wmimofck.exeвмимофкквмимофкквмимофкк
mc.exeMcмессажекомпилемессажекомпиле
Ctrpp.exeктрппктрппктрпп

В следующем примере показано, как вызывать средства.

файлы заголовков в наборе драйверов Windows

комплект драйверов Windows (WDK) содержит все файлы заголовков (h-файлы), необходимые для построения драйверов режима ядра и пользовательского режима. Файлы заголовков находятся в папке include в папке установки WDK. пример: C:\Program files (x86) \ Windows Kits\10\Include.

файлы заголовков содержат сведения о версии, поэтому можно использовать один и тот же набор файлов заголовков независимо от того, какая версия Windows будет выполняться драйвером.

константы, представляющие версии Windows

файлы заголовков в WDK содержат условные инструкции, которые определяют элементы программирования, доступные только в определенных версиях операционной системы Windows. Элементы управления версиями включают функции, перечисления, структуры и члены структуры.

Чтобы указать программные элементы, доступные в каждой версии операционной системы, файлы заголовков содержат условия препроцессора, которые сравнивают значение NTDDI_VERSION с набором предопределенных значений констант, которые определены в Sdkddkver. h.

ниже приведены стандартные постоянные значения, представляющие версии операционной системы Microsoft Windows.

Provision a computer for driver deployment and testing (WDK 10)

Provisioning a target or test computer is the process of configuring a computer for automatic driver deployment, testing, and debugging. To provision a computer, use Microsoft Visual Studio.

A testing and debugging environment has two computers: the host computer and the target computer. The target computer is also called the test computer. You develop and build your driver in Visual Studio on the host computer. The debugger runs on the host computer and is available in the Visual Studio user interface. When you test and debug a driver, the driver runs on the target computer.

The host and target computers must be able to ping each other by name. This might be easier if both computers are joined to the same workgroup or the same network domain. If your computers are in a workgroup, we recommend that you connect the computers with a router rather than a hub or switch.

It is recommended that both the host and target run the same version of Windows.

For the latest information on the WDK and known issues, see the WDK support forum and the Windows Hardware Q&A Forum.

Prepare the target computer for provisioning

On the target computer, install the operating system that you’ll use to run and test your driver.

Install the WDK. You do not need to install Visual Studio, however, unless you plan on doing driver development on the target computer.

If Secure Boot is enabled on an x86 or x64 target computer, disable it. For information about Unified Extensible Firmware Interface (UEFI) and Secure Boot, see UEFI Firmware.

If the target computer uses an Arm processor, install the Windows Debug Policy. This can be done only by Microsoft or the manufacturer of the target computer. You do not need to disable Secure Boot.

On the target computer, run the WDK Test Target Setup MSI that matches the platform of the target computer. You can find the MSI in the Windows Driver Kit (WDK) installation directory under Remote.

Example: C:\Program Files (x86)\Windows Kits\10\Remote\x64\WDK Test Target Setup x64-x64_en-us.msi

If the target computer is running an N or KN version of Windows, install the Media Feature Pack for N and KN versions of Windows:

If your target computer is running Windows Server, find the DriverTest folder that was just created by WDK Test Target Setup MSI. (Example: c:\DriverTest). Select and hold (or right-click) the DriverTest folder, and choose Properties. On the Security tab, give Modify permission to the Authenticated Users group.

Verify that the host and target computers can ping each other. Open a Command Prompt window, and enter ping ComputerName.

If the host and target computers are joined to a workgroup and are on different subnets, you might have to adjust some firewall settings so that the host and target computers can communicate. Follow these steps:

Provision the target computer

Now you’re ready to provision the target computer from the host computer in Visual Studio.

On the host computer, in Visual Studio, select the Extensions menu, point to Driver, point to Test, and select Configure Devices.

In the Configure Devices dialog, select Add new device.

For Network host name, enter the name or local IP address of your target computer. Select Provision device and choose debugger settings.

Windows driver kit. vs2019 device configuration. Windows driver kit фото. Windows driver kit-vs2019 device configuration. картинка Windows driver kit. картинка vs2019 device configuration. 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).

Select Next.

Select a type of debugging connection, and enter the required parameters.

For more information about setting up debugging over various types of connections, see Setting Up KDNET Network Kernel Debugging Manually and the related documentation for the Debugging Tools for Windows.

The provisioning process takes several minutes and might automatically reboot the target computer once or twice. When provisioning is complete, select Finish.

Provisioning virtual machines through the WDK’s automatic provisioning process is not supported. However, you can test drivers on a VM by setting up the target VM manually as described in the step by step echo lab.

начало работы с драйверами Windows

При написании драйвера для запуска в Windows операционной системе доступны два основных варианта. Вы можете написать драйвер Windows Desktop, который работает только в Windows выпусках Desktop. Кроме того, вы можете выполнить несколько дополнительных требований и написать драйвер Windows, который работает как в классических, так и в других вариантах Windows. Классификация драйверов Windows расширяется и заменяет более раннюю универсальную классификацию драйверов.

К драйверам Windows применяются следующие дополнительные требования:

В следующей таблице перечислены различия между двумя классификациями:

КомпонентДрайверы Windowsдрайверы для настольных систем Windows
Выполняется на Windows DesktopДаДа
Выполняется в вариантах, отличных от настольных WindowsДаНет
Должен быть сертифицирован с помощью WHCPДаНет
WDK & HLK являются основными транспортными средствами для разработки и сертификации водителейДаДа
Соблюдение более строгих требований к надежности и доступности обслуживания (например, изоляция пакетов драйверов)ДаНет

Хотя драйвер, работающий только на Windows Desktop, не требуется для удовлетворения дополнительных требований для драйвера Windows, это повышает удобство обслуживания и надежность драйверов, а также подготавливает драйвер к возможной будущей сертификации на вариантах Windows, отличных от настольных компьютеров.

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

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

The ACPI documentation has been updated with new _OSI string information for Windows 11, version 22H2.

Audio

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.

Driver security

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.

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.

Provisioning support for loading pre-production drivers

Windows Debugging Tools

WPP Recorder

Drivers can add timestamps to Inflight Trace Recorder (IFR) log entries. Timestamps can specify millisecond or tenth of a microsecond granularity.

Related Topics

For information on what was new for drivers in past Windows releases, see the following pages:

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Creating a New Software Driver

In this topic we explain how to use Visual Studio to start writing a new software driver. Software drivers are different from device function drivers, filter drivers, and file system drivers, which we cover in other topics. For more information about software drivers and how they differ from other types of drivers, see What is a Driver? and Choosing a Driver Model.

To begin, first determine which driver model is appropriate for your software driver. The three options are the Kernel Mode Driver Framework (KMDF), the legacy NT driver model, and the Windows Driver Model (WDM). For help determining which model is best for you, see Choosing a Driver Model.

Case 1: You want to use KMDF

When you create a new KMDF driver, you must select a driver name that has 32 characters or less. This length limit is defined in wdfglobals.h.

Case 2: You want to use the legacy NT model

In Visual Studio, on the File menu, choose New | Project.

In Visual Studio, in the New Project dialog box, under Windows Driver, select WDM | Empty WDM Driver.

You are not going to write a WDM driver, but you need the Empty WDM Driver template.

Fill in the Name and Location boxes, and select OK.

At this point, you have an empty WDM driver project. In the Solution Explorer window, select and hold (or right-click) your driver project, and choose Add | New Item.

In the Add New Item dialog box, select C++ File (.cpp), enter a name for your file, and select OK.

Case 3: You want to use WDM

It is extremely unlikely that you’ll want to use WDM for a software driver. But if you do, follow these steps.

In Visual Studio, on the File menu, choose New | Project.

In Visual Studio, in the New Project dialog box, under Windows Driver, select WDM.

Fill in the Name and Location boxes, and select OK.

At this point, you have an empty WDM driver project. In the Solution Explorer window, select and hold (or right-click) your driver project, and choose Add | New Item.

In the Add New Item dialog box, select C++ File (.cpp), enter a name for your file, and select OK.

DCH Design Principles and Best Practices

This page describes design principles and best practices for Windows Drivers.

DCH Design Principles

There are three design principles to consider for a Windows Driver to be DCH-compliant:

Declarative (D): Install the driver by using only declarative INF directives. Don’t include co-installers or RegisterDll functions.

Componentized (C): Edition-specific, OEM-specific, and optional customizations to the driver are separate from the base driver package. As a result, the base driver, which provides only core device functionality, can be targeted, flighted, and serviced independently from the customizations.

Hardware Support App (H): Any user interface (UI) component associated with a Windows Driver must be packaged as a Hardware Support App (HSA) or preinstalled on the OEM device. An HSA is an optional device-specific app that’s paired with a driver. The application can be a Universal Windows Platform (UWP) or Desktop Bridge app. You must distribute and update an HSA through the Microsoft Store. For details, see Hardware Support App (HSA): Steps for driver developers and Hardware Support App (HSA): Steps for app developers.

The acronym «DCH» refers to the principles listed above. Please refer to the DCH-Compliant Driver Package Example page to see how a driver sample can apply DCH design principles.

Overview

Driver packages that are DCH-compliant contain an INF file and binaries that install and run on Universal Windows Platform (UWP)-based editions of Windows. They also install and run on other editions of Windows 10 and 11 that share a common set of interfaces.

DCH-compliant driver binaries can use KMDF, UMDF 2, or the Windows Driver Model (WDM).

DCH-compliant drivers consist of the following parts:

The base driver contains all the core functionality and shared code. The optional component packages can contain customizations and additional settings.

Typically, a device manufacturer, or independent hardware vendor (IHV), writes the base driver. Then, a system builder, or original equipment manufacturer (OEM), provides any optional component packages.

After an IHV has certified the base driver package, it can be deployed on all OEM systems. Because a base driver package can be used across all systems that share a hardware part, Microsoft can test the base driver package broadly via Windows Insider flighting, rather than limiting distribution to specific machines.

The OEM validates only the optional customizations that it provides for the OEM system.

Requirements

To create a driver package that follows DCH design principles, follow these steps:

Best practices

If your INF performs any custom setup actions that depend on the target platform, consider separating them out into an extension INF. You can update an extension INF independently from the base driver package to make it more robust and serviceable. For more information, see Using an extension INF file.

In the INF DestinationDirs section, set the destination directories to dirid 13 to make the driver run from the driver store. This setting won’t work for some devices.

использование Enterprise WDK

Enterprise WDK содержит необходимые элементы для сборки драйверов и базовых тестовых приложений Win32 driver. Используйте предпочтительный редактор кода для изменения исходного кода и файлов проекта. поскольку это основано на командной строке, Enterprise WDK не имеет некоторых функций, включенных в Visual Studio, таких как интегрированная среда разработки, развертывание драйверов и тестирование драйверов.

Приступая к работе

после создания среды сборки ее можно использовать для работы с файлами или сборки Visual Studio проектов. Например, если выбран диапазон 10.0.0.0/20 для виртуальной сети, для пространства клиентских адресов можно выбрать 10.1.0.0/24.

основные MSBuild команды для проектов и решений:

Чтобы создать ярлык на рабочем столе, сделайте следующее:

% ComSpec%/k pushd && лаунчбуилденв. cmd

Где — расположение, куда были извлечены файлы, например д:\евдк

% ComSpec%/k pushd «д:\евдк» && лаунчбуилденв. cmd

Тестирование драйвера

WDK добавляет интерфейс тестирования драйверов в Visual Studio, который позволяет создавать, развертывать, устанавливать и тестировать драйверы на удаленном тестовом компьютере в сети. WDK также предоставляет набор тестов драйверов устройств, которые можно использовать для тестирования функций и функций драйвера. Вы также можете написать собственные тесты драйверов с помощью шаблона тестирования драйверов в Visual Studio.

Демонстрация видео

В этом видео показано, как выполнять тесты, связанные с драйвером, в тестовой группе.

В этом разделе описываются некоторые стратегии по тестированию драйвера и сведения о выборе и настройке удаленного компьютера для использования при тестировании.

чтобы подготовить драйвер для общедоступного распространения, необходимо запустить Windows комплект сертификации оборудования (хкк). сведения о программе сертификации Windows и о том, как получить хкк, см. в Windows программе сертификации оборудования.

WDK предоставляет двоичные файлы и средства тестирования, которые упрощают запуск основных тестов устройства из командной строки. Дополнительные сведения см. в статье выполнение тестов девфунд с помощью командной строки.

Когда следует начать тестирование? После выполнения требований к драйверу можно приступить к проектированию тестовых случаев для проверки реализации критических требований. Исследования показывают, что поиск и устранение дефектов в коде становится более затратным, чем более чем больше проблем остается в коде. Поиск и устранение дефектов на ранних этапах цикла разработки — менее дорогостоящие и перебои, чем поиск дефектов после выпуска и распространения кода. Создание тестовых случаев на раннем этапе также может помочь найти проблемы в проекте.

расширения WDK для Visual Studio предоставляют интерфейс тестирования устройства, позволяющий удобно создавать, развертывать, устанавливать и тестировать драйверы на тестовом компьютере в сети. WDK предоставляет набор тестов драйверов устройств, которые можно использовать для тестирования функций и функций драйвера.

с помощью Windows driver Kit (WDK Windows 8) можно создавать собственные тесты драйверов или настраивать некоторые из предоставленных тестов. вы можете развернуть тесты, созданные на удаленных тестовых компьютерах, с помощью платформы тестирования драйверов, которую предоставляет WDK для Microsoft Visual Studio Ultimate 2012.

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Installing preview versions of the Windows Driver Kit (WDK)

This page contains installation instructions for Insider Preview (pre-release) versions of the Windows Driver Kit (WDK). The download links for the latest pre-release version of the WDK and the EWDK are on https://www.microsoft.com/software-download/windowsinsiderpreviewWDK.

Install Windows Driver Kit (WDK) Insider Preview

1. Install Visual Studio

2. Disable strong name validation

The WDK Visual Studio Extensions are currently not strong name signed. Run the following commands from an elevated command prompt to disable strong name validation:

3. Install SDK Insider Preview

4. Install WDK Insider Preview

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

Install Enterprise WDK (EWDK) Insider Preview

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.

To get started, disable strong name validation by running the following commands from an elevated command prompt:

Then mount the ISO that you downloaded from the Insider Preview page and select LaunchBuildEnv to use the EWDK.

Windows Driver Kit

Description

Free Download

A complete driver development kit that bundles all the tools and components you need in order to create functional drivers for the Windows platform

The Windows Driver Kit or in short, WDK is a development toolset that can be used in order to create drivers compatible with the Windows operating system.

It bundles libraries and components, compilers, code samples and various other tools designed to assist programmers in creating fully-functional drivers for Windows 7, Vista, XP, Server 2003, 2008 and 2008 R2. Update packs are available to ensure compatibility with Windows 8, 8.1, Server 2012 and Server 2012 R2.

Previously known as the Windows Driver Development Kit (or DDK), this collection of tools and components is provided by Microsoft to help developers author drivers for their devices, in order to facilitate the connection between the external device and a computer that runs on any of the aforementioned Windows editions.

The provided samples, alongside the rich documentation are designed to ease the development process for all users.

The package includes the Windows Driver Foundation, the Installable File System Kit and the Driver Test Manager, all working together in order to provide assistance throughout the development process, from programming to testing, debugging and deployment.

Windows Driver Kit seamlessly integrates with Microsoft Visual Studio, enabling you to build new drivers while working in a familiar environment.

The Windows Driver Kit is aimed at driver developers, providing them with all the tools and documentation they need in order to generate functional drivers for the Windows platform.

Installing preview versions of the Windows Driver Kit (WDK)

This page contains installation instructions for Insider Preview (pre-release) versions of the Windows Driver Kit (WDK). The download links for the latest pre-release version of the WDK and the EWDK are on https://www.microsoft.com/software-download/windowsinsiderpreviewWDK.

Install Windows Driver Kit (WDK) Insider Preview

1. Install Visual Studio

2. Disable strong name validation

The WDK Visual Studio Extensions are currently not strong name signed. Run the following commands from an elevated command prompt to disable strong name validation:

3. Install SDK Insider Preview

4. Install WDK Insider Preview

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

Install Enterprise WDK (EWDK) Insider Preview

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.

To get started, disable strong name validation by running the following commands from an elevated command prompt:

Then mount the ISO that you downloaded from the Insider Preview page and select LaunchBuildEnv to use the EWDK.

Other WDK downloads

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:

РазделОписание
Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

MSBuild учебник для разработчиков WDK

в этом разделе представлено несколько базовых MSBuild терминологии для разработчиков WDK, которые знакомы с Build.exe и NMake.exe. в этом разделе показано создание простых проектов MSBuild.

Концепции NMAKE, относящиеся к MSBuild

Если вы работали с Build.exe и предыдущими версиями WDK (до WDK 8), вы, вероятно, знакомы с терминологией и концепциями, которые NMake.exe использует.

основные понятия MSBuild

главное MSBuild расширение файла для проектов C++ —. vcxproj.

Команды теперь называются задачамии не являются просто вызовом процессов командной строки. вместо этого задачи — это блоки исполняемого кода, которые MSBuild могут использоваться для выполнения атомарных операций сборки. полный список задач см. в разделе MSBuild задачи, относящиеся к Visual C++.

Целевые объекты группируют задачи в определенном порядке и позволяют разделить процесс сборки на более мелкие единицы.

Элемент является объектно-ориентированным вариантом свойства. Хотя свойство имеет формат «имя/значение», формат элемента — «имя/объект», где объект имеет несколько атрибутов. Элементы являются массивами объектов.

ItemGroup — это коллекция элементов.

дополнительные сведения о MSBuild и задачах сборки см. в разделе MSBuild основные понятия и справочник по MSBuild.

известные проблемы с набором драйверов (WDK) Windows

В этом разделе описаны известные проблемы, связанные с WDK.

WDK для Windows 10, версия 2004

УСТРАНЕНа проблема в функциях Ексаллокатепулзеро, Ексаллокатепулкуотазеро и Ексаллокатепулприоритизеро

в 2020 мая OSR обнаружила, что новая поддержка нижнего уровня для автоматического обнуления распределения пула привела к возникновению проблемы, которая могла привести к выделению, не инициализированному нулем в системах, где выполняется Windows 10, версия 1909. теперь это устранено с помощью обновления безопасности wdk для Windows 10, версии 2004 и Enterprise WDK (евдк) для Windows 10 версии 2004 в 16 декабря. корпорация майкрософт потратила на обновление системы безопасности и обновила евдк для включения Visual Studio средств сборки 16,7. Корпорация Майкрософт рекомендует всем разработчикам драйверов удалить исходный пакет SDK и WDK (версия 2004) и установить пакет SDK для обновления, WDK или ЕВДК.

чтобы убедиться в наличии полного решения для обеспечения безопасности, выпущено исправление для Windows 10 версии 1909 в ноябре, поэтому, если драйвер был создан с учетом проблемы безопасности, операционная система будет защищена от нее.

Помимо загрузки обновленного WDK/ЕВДК, корпорация Майкрософт рекомендует всем драйверам переключить все выделения ядра на использование нового обнуления пула ДДИС, который по умолчанию возвращает нулевую память. Это повысит безопасность и надежность драйвера. чтобы помочь в этом переходе, корпорация майкрософт создала статическое правило проверки драйверов, которое доступно в предварительной версии Windows 10 WDK версии 20236 и выше. Правило определит все экземпляры в исходном коде драйвера, где используются старые ДДИС выделения пула, и порекомендует заменить их новым, более безопасным эквивалентным DDI. Это правило применимо к драйверам, основанным на WDM, ВДФ и NDIS.

Установка WDK больше не включает устранение устранением рисков Spectre для всех проектов C++, как показано в WDK 1903

Несмотря на то, что установка WDK включит устранением рисков Spectre по умолчанию для всех драйверов, она больше не будет включать их для всех проектов C++.

Ошибка «не найдена WDK, соответствующая целевому объекту» 10.0.19041.0 «.

при выборе [Windows SDK Version] в значение «10,0 (последняя установленная версия)» в WDK 10.0.19041.0 вызывает ошибку «не найдена WDK, соответствующая целевой версии» 10.0.19041.0 «, даже если установлена версия пакета SDK.

Сбой создания ДВЛ с помощью System. IO. FileNotFoundException

При попытке создать журнал проверки драйверов (ДВЛ) будет выведена следующая ошибка:

Это может произойти в средах командной строки и графического пользовательского интерфейса. эта проблема решена в будущей версии wdk и может быть показана на Windows Insider Preview WDK. К сожалению, для текущей версии обходной путь не существует.

Сбой СДВ в ЕВДК, если VS не установлен

СДВ зависит от VCRUNTIME140D.dll в составе Visual Studio. Таким образом, запуск ЕВДК на компьютере без установленного VS завершится ошибкой. чтобы обойти эту ошибку, установите на компьютере Visual Studio.

При использовании обозревателя тестов WDK средство проверки драйверов не получает включенные или отключенные

Средство проверки драйверов не включается или отключается при выполнении фундаментальных тестов устройства с помощью обозревателя тестов WDK.

Обходной путь: На клиентском компьютере вручную Включите или отключите средство проверки драйверов для этих инструкций.

одностороннее установка Windows 10, версии 2004 и WDK Windows 10, версия 1903 или версия 1803

Если на одном компьютере установлены обе версии комплекта, функция «развернуть драйвер» не будет работать для более старой версии.

Обходной путь: Используйте 1803 на отдельном компьютере, если требуется функция развертывания драйвера.

Windows тесты платформы тестирования устройств (вдтф) теперь выполняются только в системах с соответствующими версиями Windows 10 в качестве WDK.

в WDK для Windows 10, версия 1809 в целях поддержки этой версии Windows 10, версия 1809 были внесены изменения в вдтф. В результате ВДТФ больше не будет работать в ОС нижнего уровня. изменение продолжится с помощью WDK для Windows 10 версии 2004.

Альтернативой для тестирования нижнего уровня

вдтф тесты в WDK для Windows 10, версия 1803 может выполняться в предыдущих версиях Windows.

апивалидатор

На компьютере x86 Апивалидатор не может работать с двоичными файлами x64. Если сборка драйверов x64 на компьютере x86 Апивалидатор должна быть отключена.

Решение:

Перейдите на страницу свойств решения драйвера.

Выберите апивалидатор, затем Общие, а затем измените Запуск апивалидатор с «Да» на «нет«.

для работы WDK в системах Windows 7 требуется KB 3033929

перед установкой WDK в системах, работающих под управлением Windows 7, необходимо установить рекомендацию по безопасности Microsoft 3033929 (KB3033929). KB3033929 можно скачать в центре загрузки Майкрософт.

при установке WDK выдается ошибка Visual Studio, что компонент надстройки уже установлен

это сообщение об ошибке можно увидеть, если удалено wdk, но расширение драйверов WDK для Visual Studio не было удалено.

ВОПРОСЫ И ОТВЕТЫ

Разделы справки узнать, содержит ли версия WDK или евдк, что в нем содержится исправление обнуления выделений пула?

в системном Параметры перейдите к разделу установка и удаление программ, найдите пакет драйверов Windows и запишите версию. в исходном WDK для Windows 10 версии 2004 установлена версия 10.0.19041.1, обновленная версия WDK — 10.0.19041.685 для евдк. после запуска среды евдк просмотрите заголовок командного окна. Обновленная версия будет содержать vb_release_svc_prod1.19041.685. Кроме того, при просмотре переменных среды переменная буилдлаб должна показывать vb_release_svc_prod1.19041.685.

пакет средств разработки Windows Software Development Kit (SDK) также был обновлен. это также необходимо?

нет, но обновленный Windows пакет средств разработки программного обеспечения (SDK) содержит исправление для onecore. lib, которое может быть приятно. Кроме того, обычно рекомендуется поддерживать согласованность пакетов SDK и WDK.

если у меня уже есть WDK для Windows 10, то необходимо установить версию 2004, прежде чем устанавливать обновленную версию?

Настоятельно рекомендуется, если у вас есть оригинальный пакет SDK 2004 и WDK, которые будут удалены, а также установить пакет SDK для обновления безопасности и WDK. С другой стороны, если обновленное WDK установлено поверх исходного WDK, обновленная версия будет перезаписана в исходное значение. Примечание. в этом сценарии «Установка и удаление программ» будут перечислены обе версии.

Windows Driver Kit 7.1.0

Эта коллекция не предлагает драйверы устройств для вашего компьютера. Для использования этого мощного приложения вы должны иметь практические знания языка программирования Си. Приложение поможет вам создать драйверы для различных устройств, компьютеров и систем. Также возможна бесшовная интеграция с Microsoft Visual Studio.

НазваниеWindows Driver Kit
Версия7.1.0
РазработчикMicrosoft Corp.
Домашняя страница продуктаWindows Driver Kit
ЛицензияБесплатно (Freeware)
Загрузки прошлой недели9
Все время загрузки12007
Размер файла619.8MB
Поддержка ОСWin 7 / Server 2008
КатегорияИнструменты разработчика

Похожие программы

LimeWire 5.4.6

Бесплатная и мощная программа для обмена файлами.

PS3 Emulator 1.1.7

Эмулятор Sony PlayStation PS3.

Wise Care 365 5.2.1.513

Программное обеспечение для очистки и оптимизации ПК.

WinMerge 2.16.2

Инструмент для управления файлами и каталогами.

Directory Opus 12.14

Файловый менеджер для Microsoft Windows.

NetDrive 3.7.687

Сетевой диск для Windows.

Многофункциональное программное обеспечение для восстановления, помогающее устранять многие проблемы с Windows.

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

WDK and MSBuild overview

Visual Studio can manage multiple projects. This section describes the WDK build environment.

A Visual Studio solution can consist of a single project or multiple projects: both driver projects and non-driver projects. Every project is associated with a platform toolset. The platform toolset extends and modifies the build process for a given target architecture in order to build a particular kind of binary. The binary can be a driver, a library, or an executable program.

The following figure shows a typical build process using the MSBuild platform. In the diagram, the driver project (MSBuild Project 1) uses driver platform toolset to build drivers. The driver project can reference Windows kernel-mode and user-mode headers and libraries. The Windows DLL project (MSBuild Project 2) builds a DLL and uses the Windows SDK platform toolset to build applications or user-mode libraries. Every platform toolset has its own set of targets. These targets invoke tasks. These tasks will execute the build tools.

Kernel-Mode Driver Architecture Design Guide

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 Overview containing:

Kernel-Mode Components describes the primary kernel-mode managers and components of the Windows operating system.

ComponentDescription
Managers
Windows Kernel-Mode Object ManagerManages objects: files, devices, synchronization mechanisms, registry keys, and so on.
Windows Kernel-Mode Memory ManagerManages physical memory for the operating system.
Windows Kernel-Mode Process and Thread ManagerHandles the execution of all threads in a process.
Windows Kernel-Mode I/O ManagerManages the communication between applications and the interfaces provided by device drivers.
Windows Kernel-Mode Plug and Play ManagerA 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 ManagerManages the orderly change in power status for all devices that support power state changes.
Windows Kernel-Mode Configuration ManagerManages the registry, such as monitoring changes in the registry or registering callbacks on specific registry data.
Windows Kernel-Mode Kernel Transaction ManagerImplements transaction processing in kernel mode.
Windows Kernel-Mode Security Reference MonitorProvides routines for your driver to work with access control.
Libraries
Windows Kernel-Mode Kernel LibraryImplements 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 LibraryRefers 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 LibraryA set of common utility routines needed by various kernel-mode components.
Windows Kernel-Mode Safe String LibraryA safe string library to provide greater security in kernel-mode development.
Windows Kernel-Mode DMA LibraryA direct memory access (DMA) library for device driver developers.
Windows Kernel-Mode HAL LibraryA hardware abstraction layer (HAL) for kernel-mode driver development.
Windows Kernel-Mode CLFS LibraryA transactional logging system, the Common Log File System (CLFS).
Windows Kernel-Mode WMI LibraryA 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.

Memory 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 Service 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.

WDK and Visual Studio build environment

The Windows Driver Kit (WDK)В 8.1 and WDK 8 introduced a major change to the environment that you use to build a driver. The WDK no longer uses Build.exe. The WDK build environment for drivers uses MSBuild.exe and is fully integrated with the Visual Studio development environment. This means that source files, makefile.inc, makefile.new and other related build files present in the previous version of the WDK are no longer used. The WDK now enables you to create, edit, build, test, and deploy a driver through Visual Studio. The purpose of this document is to provide information to help users familiar with previous WDKs in getting started with the WDKВ 8.1 and WDK 8.

NoteВ В Projects and solutions created with the WDK 8 must be upgraded to work with the WDKВ 8.1 and Microsoft Visual StudioВ 2013. Before you open the projects or solutions, run the ProjectUpgradeTool. The ProjectUpgradeTool converts the projects and solutions so that they can be built using WDKВ 8.1.

In this section

This section introduces some basic MSBuild terminology to WDK developers, who are familiar with Build.exe and NMake.exe. This section shows the construction of simple MSBuild projects.

Visual Studio can manage multiple projects. This section describes the WDK build environment.

The Windows Driver Kit (WDK) takes advantage of the MSBuild platform toolset feature to provide tools and libraries that are specific to driver development. The MSBuild platform toolset feature is extensible. The specific version of the platform toolset that you want to use is controlled by an MSBuild property called PlatformToolset. Projects can switch between tools and libraries by setting the PlatformToolset property in the project file.

The driver property sheets have default settings for all of the tools that MSBuild uses to build any driver project.

The WindowsDriver.Common.targets, WindowsDriver.masm.targets, and WindowsDriver.arm.targets files provide the targets that are necessary to build a driver.

By default, the WDK uses the intermediate directory $(IntDir) macro to specify the default build output directory.

MicrosoftDocs/windows-driver-docs

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Microsoft Open Source Code of Conduct

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

Windows Driver Documentation

Welcome to the Windows driver docs repository, housing the source for the official Windows Driver Kit documentation available on Docs.microsoft.com.

If you’re looking for the driver reference (API/DDI) documentation, that’s in a different repo. See https://github.com/MicrosoftDocs/windows-driver-docs-ddi.

We actively merge contributions into this repository via pull request into the staging branch (for the public repo) or the main branch (for the private repo).

For more information on contributing, read our contributions guide.

About

The official Windows Driver Kit documentation sources

Scarica il Windows Driver Kit (WDK)

Se ГЁ stata installata la Windows 11 originale, la versione 22H2 WDK tra maggio e agosto 2022 (versione 10.0.22621.1), potrebbe essere visualizzato il messaggio di errore seguente quando si avvia Visual Studio con WDK.

Г€ possibile ignorare in modo sicuro questo messaggio oppure disinstallare WDK e quindi reinstallare WDK (aggiornato il 19 agosto 2022 alla versione 10.0.22621.382) usando il collegamento di download WDK riportato di seguito.

Non ГЁ ancora possibile eseguire il debug dei driver all’interno dell’interfaccia di Visual Studio quando si usa Visual Studio 2022 versione 17.2.0 e il Windows 11 versione 22H2 WDK (versione 10.0.22621.382). Per risolvere il problema, eseguire il debug con WinDbg o usare una versione di Visual Studio precedente alla versione 17.2.0. Il seguente messaggio di errore ГЁ correlato a questo problema:

WdK viene usato per sviluppare, testare e distribuire driver per Windows.

A partire dalla versione Windows 11 versione 22H2 di WDK e EWDK, i kit supportano:

PiГ№ WDKs e EWDKs possono essere installati simultaneamente nello stesso computer e anche essere parte dello stesso sistema di compilazione. Г€ possibile eseguire la Windows 11 versione 22H2 WDK in Windows 7 e versioni successive.

Per eseguire la destinazione Windows 8.1, Windows 8 e Windows 7, sarГ necessario installare un WDK precedente e una versione precedente di Visual Studio nello stesso computer o in un computer separato. Per i collegamenti ai kit meno recenti, vedere Altri download WDK.

Alcuni stack specifici del dispositivo (ad esempio grafica) continuano ad avere componenti in modalitГ utente x86/ARM32 per supportare app x86/ARM32.

A partire da questa versione, i co-installer ridistribuibili di WDF non sono piГ№ supportati.

In un computer con Windows 11, versione 22H2 WDK e WDK precedente, durante la compilazione di un driver WDF 1.11, msbuild non riesce perchГ© non riesce a trovare la coinstallazione WDF. Per risolvere questo problema, prima di installare Windows 11, versione 22H2 WDK, eseguire il backup della cartella \Program files (x86)\windows kit\10\redist\wdf e ripristinarlo in seguito. In alternativa, se ГЁ giГ stato installato il Windows 11, versione 22H2 WDK, installare il file MSI in WDK 8 componenti ridistribuibili in un computer separato e copiare la redist cartella nella cartella precedente. Per altre informazioni, vedere Ridistribuibili Framework Components.

Scaricare e installare il Windows 11, versione 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Passaggio 1: Installare Visual Studio 2022

WdK richiede Visual Studio. Per altre informazioni sui requisiti di sistema per Visual Studio, vedere Requisiti di sistema di Visual Studio 2022.

Le edizioni seguenti di Visual Studio 2022 supportano lo sviluppo di driver per questa versione:

Quando si installa Visual Studio 2022, selezionare lo sviluppo desktop con il carico di lavoro C++. Il Windows 11 versione 22H2 Software Development Kit (SDK) compatibile con la Windows 11, la versione 22H2 WDK non ГЁ inclusa in Visual Studio. Usare il collegamento di download dell’SDK nel passaggio 2 seguente.

WDK dispone di mitigazione spectre abilitata per impostazione predefinita, ma richiede l’installazione di librerie con mitigazione spectre con Visual Studio per ogni architettura in fase di sviluppo. Inoltre, lo sviluppo di driver per Arm/Arm64/Arm64EC richiede anche l’installazione degli strumenti di compilazione per queste architetture con Visual Studio. Per individuare questi elementi, ГЁ necessario conoscere la versione piГ№ recente di MSVC installata nel sistema.

Con queste informazioni (ultime), passare a Singoli componenti e cercare PiГ№ recente. In questo modo verranno restituiti i set di strumenti per tutte le architetture, inclusi i lib attenuati spectre. Selezionare l’architettura del driver per cui si sta sviluppando.

Ad esempio, la ricerca di Latest restituisce quanto segue:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Passaggio 2: Installare Windows 11, versione 22H2 SDK

Questo SDK deve essere installato separatamente fino a quando non ГЁ disponibile tramite Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Passaggio 3: Installare Windows 11, versione 22H2 WDK

L’estensione WDK Visual Studio ГЁ inclusa nell’installazione WDK predefinita.

Se non ГЁ possibile trovare modelli di progetto driver in Visual Studio, l’estensione WDK Visual Studio non ГЁ stata installata correttamente. Per risolvere questo problema, eseguire il file WDK.vsix da questo percorso: C:\Programmi (x86)\Windows Kits\10\Vsix\VS2022\10.0.22621.382\WDK.vsix.

ENTERPRISE WDK (EWDK)

EWDK ГЁ un ambiente autonomo della riga di comando autonomo per la creazione di driver. Include Visual Studio Build Tools, l’SDK e wdK. La versione pubblica piГ№ recente di EWDK contiene Visual Studio 2022 Build Tools 17.1.5 e il set di strumenti MSVC v14.31. Per iniziare, monta l’immagine ISO ed esegui LaunchBuildEnv.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, versione 22H2 EWDK con Visual Studio Build Tools

Г€ possibile usare l’interfaccia di Visual Studio con gli strumenti di compilazione forniti in EWDK.

Si noti che la versione principale di Visual Studio deve corrispondere alla versione in EWDK. Ad esempio, Visual Studio 2022 funziona con EWDK che contiene VS17. Strumenti di compilazione X. Per un elenco dei numeri di versione di Visual Studio 2022, vedere Versioni di Visual Studio 2022.

Esempi di driver per Windows

Per scaricare gli esempi di driver, eseguire una delle operazioni seguenti:

Overview of Windows Components

The following figure shows the major internal components of the Windows operating system.

Windows driver kit. ntarch. Windows driver kit фото. Windows driver kit-ntarch. картинка Windows driver kit. картинка ntarch. 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).

As the figure shows, the Windows operating system includes both user-mode and kernel-mode components. For more information about Windows user and kernel modes, see User Mode and Kernel Mode.

Drivers call routines that are exported by various kernel components. For example, to create a device object, you would call the IoCreateDevice routine which is exported by the I/O manager. For a list of kernel-mode routines that drivers can call, see driver support routines.

In addition, drivers must respond to specific calls from the operating system and can respond to other system calls. For a list of kernel mode routines that drivers may need to support, see Standard Driver Routines.

Not all kernel-mode components are pictured in the figure above. For a list of kernel mode components, see Kernel-Mode Managers and Libraries.

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

Download and install the Windows ADK

The Windows Assessment and Deployment Kit (Windows ADK) and Windows PE add-on has the tools you need to customize Windows images for large-scale deployment, and to test the quality and performance of your system, its added components, and the applications running on it. The Windows ADK includes:

The 32-bit versions of Windows PE are no longer included in the Windows PE add-ons starting with the ADK for Windows 11, version 22H2. The last supported version of 32-bit Windows PE is available in the Windows PE add-on for Windows 10, version 2004.

Download the ADK for Windows 11, version 22H2

You can use the Assessment and Deployment Kit for Windows to install Windows 11 and Windows Server 2022.

For previous versions of the ADK, see Other ADK downloads

Choose the right ADK for your scenario

If possible, use the ADK version that matches the Windows version you’re working with. If your environment has a mix of Windows versions, use the ADK version that matches the latest operating system in your environment.

Considerations when you’re working with more than one Windows version

Microsoft Endpoint Configuration Manager

If you’re working with with Microsoft Endpoint Configuration Manager, see Support for the Windows ADK in Configuration Manager to learn about the versions of the Windows ADK that you can use with different versions of Configuration Manager.

Other ADK downloads

Install the ADK

Install the ADK based on what works best for your environment.

Windows ADK tools for IT pros

Windows ADK contains core assessment and deployment tools that IT Pros can use to deploy Windows 10 company-wide, including the User State Migration Tool (USMT) and Volume Activation Management Tool (VAMT).

Windows Driver Kit (WDK) known issues

This topic details known issues concerning the WDK.

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.

DVL generation fails with System.IO.FileNotFoundException

When attempting to create a Driver Verification Log (DVL), the following error will be presented:

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:

Go to the properties page of the driver solution.

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.

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.

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Write a Hello World Windows Driver (KMDF)

This topic describes how to write a very small Universal Windows driver using Kernel-Mode Driver Framework (KMDF) and then deploy and install your driver on a separate computer.

To get started, be sure you have Microsoft Visual Studio, the Windows SDK, and the Windows Driver Kit (WDK) installed.

Debugging Tools for Windows is included when you install the WDK.

Create and build a driver

Open Microsoft Visual Studio. On the File menu, choose New > Project.

In the Create a new project dialog box, select C++ in the left dropdown, choose Windows in the middle dropdown, and choose Driver in the right dropdown.

Select Kernel Mode Driver, Empty (KMDF) from the list of project types. Select Next.

Windows driver kit. vs2019 kmdf template. Windows driver kit фото. Windows driver kit-vs2019 kmdf template. картинка Windows driver kit. картинка vs2019 kmdf template. 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).

In the Configure your new project dialog box, enter «KmdfHelloWorld» in the Project name field.

When you create a new KMDF or UMDF driver, you must select a driver name that has 32 characters or less. This length limit is defined in wdfglobals.h.

In the Location field, enter the directory where you want to create the new project.

Check Place solution and project in the same directory and select Create.

Windows driver kit. vs2019 kmdf configure. Windows driver kit фото. Windows driver kit-vs2019 kmdf configure. картинка Windows driver kit. картинка vs2019 kmdf configure. 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).

Visual Studio creates one project and a solution. You can see them in the Solution Explorer window. (If the Solution Explorer window is not visible, choose Solution Explorer from the View menu.) The solution has a driver project named KmdfHelloWorld.

Windows driver kit. vs2019 kmdf hello world solution. Windows driver kit фото. Windows driver kit-vs2019 kmdf hello world solution. картинка Windows driver kit. картинка vs2019 kmdf hello world solution. 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).

In the Solution Explorer window, select and hold (or right-click) the KmdfHelloWorld project and choose Configuration Manager. Choose a configuration and platform for the driver project. For example, choose Debug and x64.

In the Solution Explorer window, again select and hold (or right-click) the KmdfHelloWorld project, choose Add, and then select New Item.

In the Add New Item dialog box, select C++ File. For Name, enter «Driver.c».

The file name extension is .c, not .cpp.

Select Add. The Driver.c file is added under Source Files, as shown here.

Windows driver kit. vs2019 first driver kmdf. Windows driver kit фото. Windows driver kit-vs2019 first driver kmdf. картинка Windows driver kit. картинка vs2019 first driver kmdf. 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).

Write your first driver code

Now that you’ve created your empty Hello World project and added the Driver.c source file, you’ll write the most basic code necessary for the driver to run by implementing two basic event callback functions.

In Driver.c, start by including these headers:

Ntddk.h contains core Windows kernel definitions for all drivers, while Wdf.h contains definitions for drivers based on the Windows Driver Framework (WDF).

Next, provide declarations for the two callbacks you’ll use:

Use the following code to write your DriverEntry:

DriverEntry is the entry point for all drivers, like Main() is for many user mode applications. The job of DriverEntry is to initialize driver-wide structures and resources. In this example, you printed «Hello World» for DriverEntry, configured the driver object to register your EvtDeviceAdd callback’s entry point, then created the driver object and returned.

The driver object acts as the parent object for all other framework objects you might create in your driver, which include device objects, I/O queues, timers, spinlocks, and more. For more information about framework objects, see Introduction to Framework Objects.

For DriverEntry, we strongly recommend keeping the name as «DriverEntry» to help with code analysis and debugging.

Next, use the following code to write your KmdfHelloWorldEvtDeviceAdd:

EvtDeviceAdd is invoked by the system when it detects that your device has arrived. Its job is to initialize structures and resources for that device. In this example, you simply printed out a «Hello World» message for EvtDeviceAdd, created the device object, and returned. In other drivers you write, you might create I/O queues for your hardware, set up a device context storage space for device-specific information, or perform other tasks needed to prepare your device.

For the device add callback, notice how you named it with your driver’s name as a prefix (KmdfHelloWorldEvtDeviceAdd). Generally, we recommend naming your driver’s functions in this way to differentiate them from other drivers’ functions. DriverEntry is the only one you should name exactly that.

Your complete Driver.c now looks like this:

This example illustrates a fundamental concept of drivers: they are a «collection of callbacks» that, once initialized, sit and wait for the system to call them when it needs something. This could be a new device arrival event, an I/O request from a user mode application, a system power shutdown event, a request from another driver, or a surprise removal event when a user unplugs the device unexpectedly. Fortunately, to say «Hello World,» you only needed to worry about driver and device creation.

Next, you’ll build your driver.

Build the driver

In the Solution Explorer window, select and hold (or right-click) Solution ‘KmdfHelloWorld’ (1 project) and choose Configuration Manager. Choose a configuration and platform for the driver project. For this exercise, we choose Debug and x64.

In the Solution Explorer window, select and hold (or right-click) KmdfHelloWorld and choose Properties. In Wpp Tracing > All Options, set Run Wpp tracing to No. Select Apply and then OK.

To build your driver, choose Build Solution from the Build menu. Visual Studio shows the build progress in the Output window. (If the Output window is not visible, choose Output from the View menu.) When you have verified that the solution built successfully, you can close Visual Studio.

To see the built driver, in File Explorer, go to your KmdfHelloWorld folder, and then to C:\KmdfHelloWorld\x64\Debug\KmdfHelloWorld. The folder includes:

Deploy the driver

Typically when you test and debug a driver, the debugger and the driver run on separate computers. The computer that runs the debugger is called the host computer, and the computer that runs the driver is called the target computer. The target computer is also called the test computer.

So far you’ve used Visual Studio to build a driver on the host computer. Now you need to configure a target computer.

When you follow the steps to provision the target computer automatically using a network cable, take note of the port and key. You’ll use them later in the debugging step. In this example, we’ll use 50000 as the port and 1.2.3.4 as the key.

On the host computer, open your solution in Visual Studio. You can double-click the solution file, KmdfHelloWorld.sln, in your KmdfHelloWorld folder.

In the Solution Explorer window, select and hold (or right-click) the KmdfHelloWorld project, and choose Properties.

In the KmdfHelloWorld Property Pages window, go to Configuration Properties > Driver Install > Deployment, as shown here.

Check Remove previous driver versions before deployment.

For Target Device Name, select the name of the computer that you configured for testing and debugging. In this exercise, we use a computer named MyTestComputer.

Select Hardware ID Driver Update, and enter the hardware ID for your driver. For this exercise, the hardware ID is Root\KmdfHelloWorld. Select OK.

Windows driver kit. vs2019 kmdf hello world property pages. Windows driver kit фото. Windows driver kit-vs2019 kmdf hello world property pages. картинка Windows driver kit. картинка vs2019 kmdf hello world property pages. 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).

In this exercise, the hardware ID does not identify a real piece of hardware. It identifies an imaginary device that will be given a place in the device tree as a child of the root node. For real hardware, do not select Hardware ID Driver Update; instead, select Install and Verify. You’ll see the hardware ID in your driver’s information (INF) file. In the Solution Explorer window, go to KmdfHelloWorld > Driver Files, and double-click KmdfHelloWorld.inf. The hardware ID is located under [Standard.NT$ARCH$].

On the Build menu, choose Deploy Solution. Visual Studio automatically copies the files required to install and run the driver to the target computer. This may take a minute or two.

For more information about deploying drivers, see Deploying a Driver to a Test Computer.

Install the driver

With your Hello World driver deployed to the target computer, now you’ll install the driver. When you previously provisioned the target computer with Visual Studio using the automatic option, Visual Studio set up the target computer to run test signed drivers as part of the provisioning process. Now you just need to install the driver using the DevCon tool.

On the host computer, navigate to the Tools folder in your WDK installation and locate the DevCon tool. For example, look in the following folder:

C:\Program Files (x86)\Windows Kits\10\Tools\x64\devcon.exe

Copy the DevCon tool to your remote computer.

On the target computer, install the driver by navigating to the folder containing the driver files, then running the DevCon tool.

Here’s the general syntax for the devcon tool that you will use to install the driver:

The INF file required for installing this driver is KmdfHelloWorld.inf. The INF file contains the hardware ID for installing the driver binary, KmdfHelloWorld.sys. Recall that the hardware ID, located in the INF file, is Root\KmdfHelloWorld.

devcon install kmdfhelloworld.inf root\kmdfhelloworld

If you get an error message about devcon not being recognized, try adding the path to the devcon tool. For example, if you copied it to a folder on the target computer called C:\Tools, then try using the following command:

c:\tools\devcon install kmdfhelloworld.inf root\kmdfhelloworld

A dialog box will appear indicating that the test driver is an unsigned driver. Select Install this driver anyway to proceed.

Windows driver kit. debuglab image install security warning. Windows driver kit фото. Windows driver kit-debuglab image install security warning. картинка Windows driver kit. картинка debuglab image install security warning. 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).

Debug the driver

Now that you have installed your KmdfHelloWorld driver on the target computer, you’ll attach a debugger remotely from the host computer.

On the host computer, open a Command Prompt window as Administrator. Change to the WinDbg.exe directory. We will use the x64version of WinDbg.exe from the Windows Driver Kit (WDK) that was installed as part of the Windows kit installation. Here is the default path to WinDbg.exe:

C:\Program Files (x86)\Windows Kits\10\Debuggers\x64

Launch WinDbg to connect to a kernel debug session on the target computer by using the following command. The value for the port and key should be the same as what you used to provision the target computer. We’ll use 50000 for the port and 1.2.3.4 for the key, the values we used during the deploy step. The k flag indicates that this is a kernel debug session.

On the Debug menu, choose Break. The debugger on the host computer will break into the target computer. In the Debugger Command window, you can see the kernel debugging command prompt: kd>.

At this point, you can experiment with the debugger by entering commands at the kd> prompt. For example, you could try these commands:

To let the target computer run again, choose Go from the Debug menu or press «g,» then press «enter.»

To stop the debugging session, choose Detach Debuggee from the Debug menu.

Make sure you use the «go» command to let the target computer run again before exiting the debugger, or the target computer will remain unresponsive to your mouse and keyboard input because it is still talking to the debugger.

For more information about remote debugging, see Remote Debugging Using WinDbg.

Validating Windows Drivers

Use the InfVerif, Driver Verifier Driver Isolation Checks, and ApiValidator tools to test your Windows Driver for compliance with the requirements described in Getting Started with Windows Drivers.

InfVerif

InfVerif is a tool that validates INF syntax and checks that the INF conforms to requirements and restrictions.

Use InfVerif with /w and /v to verify that a Windows Driver:

Targeting current and earlier versions of Windows

Each run of InfVerif tests a single ruleset, for example /w (Windows driver compatibility) or /k (Hardware Dev Center submission). If your INF contains syntax introduced in a more recent version of Windows and you also want to target previous Windows versions, use INF decorations to mark version-specific INF entries and then run InfVerif multiple times, for example:

If there are no errors, the INF meets the Driver Package Isolation requirement of Windows Drivers.

For example, the INF AddEventProvider Directive is available starting in Windows 10, version 1809. To use this directive in an INF targeting an OS version before Windows 10, version 1809, decorate both the install section using legacy INF syntax for registering ETW event providers as well as the install section using the updated syntax.

Driver Verifier Driver Isolation Checks

To qualify as a Windows Driver, a driver must meet Driver Package Isolation requirements. Starting in Windows 10 Preview Build 19568, Driver Verifier (DV) monitors registry reads and writes that are not allowed for isolated driver packages.

You can either view violations as they happen in a kernel debugger, or you can configure DV to halt the system and generates a memory dump with details when a violation occurs. You might start driver development with the first method, then switch to the second as your driver nears completion.

To view violations as they occur, first connect a kernel debugger and then use the following commands. After a reboot has enabled the DV settings, you can monitor violations in kernel debugger output.

To enable driver isolation checks on a single driver:

To check more than one driver, separate each driver name with a space:

To configure DV to bugcheck when a violation occurs, use the following syntax:

You’ll need to reboot to enable the verification settings. To do this from the command line, specify:

Here are a few examples of error messages:

Example: ZwCreateKey provides full absolute path:

DRIVER_ISOLATION_VIOLATION: : Registry operations should not use absolute paths. Detected creation of unisolated registry key \Registry\Machine\SYSTEM

Example: ZwCreateKey provides path relative to a handle that is not from an approved API:

DRIVER_ISOLATION_VIOLATION: : Registry operations should only use key handles returned from WDF or WDM APIs. Detected creation of unisolated registry key \REGISTRY\MACHINE\SYSTEM\SomeKeyThatShouldNotExist

Consider enabling Device Fundamentals tests with DV driver isolation checks to help catch driver isolation violations early.

ApiValidator

The ApiValidator tool verifies that the APIs that your binaries call are valid for a Windows Driver. The tool returns an error if your binaries call an API that is outside the set of valid APIs for Windows Drivers. This tool is part of the WDK for WindowsВ 10.

ApiValidator validates that a driver supports API Layering, one of the requirements for Windows Drivers. For a full list of requirements, see Getting Started with Windows Drivers.

Running ApiValidator in Visual Studio

If the Target Platform property of your driver project is set to Windows Driver, Visual Studio runs ApiValidator automatically as a post-build step.

To view all the messages displayed by ApiValidator, navigate to Tools->Options->Projects and Solutions->Build and Run, and set MSBuild project build output verbosity to Detailed. When building from the command line, add the switch /v:detailed or /v:diag to your build command to increase the verbosity.

For the umdf2_fx2 driver sample, API validation errors look this:

Fixing validation errors

If you switched a legacy desktop UMDF driver project to Windows Driver, verify that you are including the correct libraries when building your binaries. Select and hold (or right-click) the project and choose properties. Navigate to Linker->Input. The Additional Dependencies should contain:

To review other linker options for targeting OneCore SKUs, see Building for OneCore.

Remove or replace API calls that are not permitted one at a time and rerun the tool until there are no errors.

In some cases, you can replace these calls with alternate DDIs that are listed on the reference pages for the desktop-only DDI. You may have to code a workaround if there is not a suitable replacement. If you need to, write a new Windows Driver starting from the driver templates in the WDK.

If you see errors like the following, please refer to the guidance in Building for OneCore.

Running ApiValidator from the Command Prompt

Important Notes:

Use the following syntax:

The command produces the following output:

Troubleshooting ApiValidator

If ApiValidator.exe outputs an incorrect format error such as the following:

Use this workaround:

Open Project properties, navigate to General, and rename Output Directory to the following:

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Windows Driver Kit

Набор инструментальных средств Windows Driver Kit (WDK) также доступен по программе подписки MSDN и точно так же, как и Windows SDK, его можно свободно скачать с сайта. Документация по Windows Driver Kit включена в библиотеку MSDN.

Хотя набор WDK предназначен для разработчиков драйверов устройств, он является обширным источником информации о внутреннем устройстве Windows.

А в документации по WDK содержится полное описание всех Windows-функций поддержки ядра и механизмов, используемых драйверами устройств как в виде учебного пособия, так и в виде справочника.

Windows driver kit. windows driver kit. Windows driver kit фото. Windows driver kit-windows driver kit. картинка Windows driver kit. картинка windows driver kit. 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).
В WDK, помимо документации, содержатся заголовочные файлы (в частности, ntddk.h, ntifs.h и wdm.h), определяющие ключевую внутреннюю структуру данных и константы, а также интерфейсы ко многим внутренним системным подпрограммам. Эти файлы пригодятся при исследовании внутренних структур данных Windows, используемых при отладке ядра.

В WDK дается полное описание таких структур (например, заголовков для диспетчера объектов, блоков ожидания, событий, мутантов, семафоров и т. д.).

При желании углубиться в изучение системы ввода-вывода и модели драйверов, читайте WDK-документацию (особенно Руководство по устройству архитектуры драйверов, работающих в режиме ядра — Kernel-ModeDriverArchitectureDesignGuide, и Справочные руководства). Также могут пригодиться книги Уолтера Они (Walter Oney) «Использование Microsoft Windows Driver Model», второе издание (Питер, 2007) и Пенни Орвика (Penny Orwick) и Гая Смита (Guy Smith) «Windows DriverFoundation. Разработкадрайверов» (BHV, 2008).

MicrosoftDocs/windows-driver-docs-ddi

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Microsoft Open Source Code of Conduct

For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Windows Driver Documentation DDI Reference

Welcome to the Windows driver docs DDI reference repository, housing the source for the official Windows Driver Kit DDI (device driver interface) documentation available on Docs.microsoft.com.

If you’re looking for the driver conceptual docs, that’s in a different repo.

We actively merge contributions into this repository via pull request into the staging branch (for the public repo) or the main branch (for the private repo).

For more information on contributing, read our contributions guide.

About

The official Windows Driver Kit DDI reference documentation sources

Overview of developing Windows client drivers for USB devices

Purpose

This section describes Universal Serial Bus (USB) support in the Windows operating system, so that you can develop USB device drivers that are interoperable with Windows.

Where applicable

USB devices are peripherals, such as mouse devices and keyboards, that are connected to a computer through a single port. A USB client driver is the software installed on the computer that communicates with the hardware to make the device function. If the device belongs to a device class supported by Microsoft, Windows loads one of the Microsoft-provided USB drivers (in-box class drivers) for the device. Otherwise, a custom client driver must be provided by the hardware manufacturer or a third party vendor. The user installs the client driver for the device when the device is first detected by Windows. After successful installation, Windows loads the client driver every time the device is attached and unloads the driver when the device is detached from the host computer.

You can develop a custom client driver for a USB device by using the Windows Driver Frameworks (WDF) or the Windows Driver Model (WDM). Instead of communicating with the hardware directly, most client drivers send their requests to the Microsoft-provided USB driver stack that makes hardware abstraction layer (HAL) function calls to send the client driver’s request to the hardware. The topics in this section describe the typical requests that a client driver can send and the device driver interfaces (DDIs) that the client driver must call to create those requests.

Developer audience

A client driver for a USB device is a WDF or WDM driver that communicates with the device through DDIs exposed by the USB driver stack. This section is intended for use by C/C++ programmers who are familiar with WDM. Before you use this section, you should understand basic driver development. For more information, see Getting Started with Windows Drivers. For WDF drivers, the client driver can use Kernel-Mode Driver Framework (KMDF) or User-Mode Driver Framework (UMDF) interfaces designed specifically to work with USB targets. For more information about the USB-specific interfaces, see WDF USB Reference and UMDF USB I/O Target Interfaces.

Development tools

The Windows Driver Kit (WDK) contains resources that are required for driver development, such as headers, libraries, tools, and samples.

USB programming reference

Gives specifications for I/O requests, support routines, structures, and interfaces used by USB client drivers. Those routines and related data structures are defined in the WDK headers.

USB driver samples

Use these samples to get started with USB client driver programming.

Related standards and specifications

You can download official USB specifications from the Universal Serial Bus Documents website. This website contains links to the Universal Serial Bus Revision 3.0 Specification and the Universal Serial Bus Revision 2.0 specification.

Documentation sections

Introduces you to USB driver development. Provides information about choosing the most appropriate model for providing a USB driver for your device. Write, build, and install your first skeleton user-mode and kernel-mode USB drivers by using the USB templates included with Microsoft Visual Studio.

Provides an overview of the USB driver stack architecture.

Learn how a client driver builds a variable-length data structure called a USB Request Block (URB) to submit requests to the USB driver stack.

Learn how a client driver builds a variable-length data structure called a USB Request Block (URB) to submit requests to the USB driver stack.

Device configuration refers to the tasks that the client driver performs to select a USB configuration and an alternate interface in each interface. The section shows the methods calls required to select a USB configuration.

Describes USB pipes, URBs for I/O requests, and how a client driver can use the device driver interfaces (DDIs) to transfer data to and from a USB device.

Написание драйверов для различных версий Windows

При создании проекта драйвера необходимо указать минимальную целевую операционную систему, которая является минимальной версией Windows запуска драйвера. Например, можно указать, что Windows 7 является минимальной целевой операционной системой. В этом случае драйвер будет работать в Windows 7 и более поздних версиях Windows.

Если вы разрабатываете драйвер для определенной минимальной версии Windows и хотите, чтобы драйвер работал с более поздними версиями Windows, не следует использовать незадокументированные функции и не следует использовать документированные функции каким-либо образом, кроме описанного в документации. В противном случае драйвер может не запуститься в более поздних версиях Windows. Даже если вы тщательно использовали только документированные функции, следует протестировать драйвер на новой версии Windows каждый раз при каждом выпуске.

Написание драйвера с несколькими версиями с использованием только общих функций

При проектировании драйвера, который будет работать в нескольких версиях Windows, самый простой подход заключается в том, чтобы драйвер мог использовать только функции и структуры DDI, которые являются общими для всех версий Windows, на которых будет работать драйвер. В этом случае для минимальной целевой операционной системы устанавливается самая ранняя версия Windows, которую будет поддерживать драйвер.

Например, для поддержки всех версий Windows, начиная с Windows 7, необходимо:

Проектируйте и реализуйте драйвер таким образом, чтобы он использовал только те функции, которые присутствуют в Windows 7.

При сборке драйвера укажите Windows 7 в качестве минимальной целевой операционной системы.

Хотя этот процесс прост, драйвер может ограничить использование только подмножества функций, доступных в более поздних версиях Windows. Во многих случаях вам потребуется использовать более новые функциональные возможности операционной системы, если она доступна для повышения безопасности, повышения надежности или включения новых функций.

Написание драйвера с несколькими версиями, использующего функции, зависящие от версий

Драйвер в режиме ядра может динамически определить, доступен ли предоставленный API операционной системы или какая версия Windows драйвер работает, и выбрать использование функций, доступных в этой среде во время выполнения. Например, драйвер, который должен поддерживать все версии Windows, начиная с Windows 7, может определить версию Windows, на котором она запущена. Если драйвер работает на Windows 7, он должен использовать только функции DDI, которые поддерживаются Windows 7. Однако тот же драйвер может использовать дополнительные функции DDI, уникальные для Windows 8, например, когда проверка времени выполнения определяет, что эти API в настоящее время присутствуют или определяют, что он работает на Windows 8.

Рекомендуется проверять доступность компонентов или API, если это возможно, а не пытаться проверить, работает ли драйвер в определенной версии операционной системы или более поздней версии.

Условное вызов функций, зависящих от версии Windows

Драйвер в режиме ядра может использовать функции MmGetSystemRoutineAddress или MmGetSystemRoutineAddressEx для динамической проверки доступности определенного API, который требуется использовать в текущей среде времени выполнения, и для получения указателя функции для вызова этого API.

Чтобы сохранить проверку типов и предотвратить непреднамеренные ошибки, необходимо создать определение типа, которое отражает исходный тип функции.

Пример. Определение доступности API и условно вызываемого API

Определение версии Windows

RtlIsNtDdiVersionAvailable — это функция, которую драйверы могут использовать во время выполнения, чтобы определить, доступны ли функции, предоставляемые определенной версией Windows. Прототип этой функции выглядит следующим образом:

В этом прототипе версия — это значение, указывающее требуемую версию Windows DDI. Это значение должно быть одной из констант версии DDI, определенной в sdkddkver.h, например NTDDI_WIN8 или NTDDI_WIN7.

RtlIsNtDdiVersionAvailable возвращает значение TRUE, если вызывающий объект выполняется в версии Windows, которая совпадает с версией, указанной версией или более поздней.

В этом прототипе версия — это значение, указывающее требуемую версию Windows и пакет обновления. Это значение должно быть одной из констант версии DDI, определенной в sdkddkver.h, например NTDDI_WS08SP3.

Обратите внимание, что RtlIsServicePackVersionInstalled возвращает значение TRUE, только если версия операционной системы точно соответствует указанной версии. Таким образом, вызов RtlIsServicePackVersionInstalled с набором версий NTDDI_WS08SP3 завершится ошибкой, если драйвер не запущен на Windows Server 2008 с пакетом обновления 4 (SP4).

Пример. Определение версии Windows и условное вызов функции, зависящей от версии

Этот пример кода, полученный из кода инициализации драйвера, определяет, работает ли драйвер на Windows 7 или более поздней операционной системе. Если это так, код получает указатель на KeAcquireInStackQueuedSpinLock.

В этом примере драйвер вызывает RtlIsNtDdiVersionAvailable, чтобы определить, работает ли драйвер на Windows 7 или более поздней версии. Если версия Windows 7 или более поздней версии, драйвер вызывает MmGetSystemRoutineAddress, чтобы получить указатель на функцию KeAcquireInStackQueuedSpinLock и сохраняет этот указатель в переменной с именем AcquireInStackQueued (которая была объявлена как тип PAISQSL).

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Other WDK downloads

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:

Client OSServer OS
Windows 11, version 21H2Windows Server 2022
Windows 10Windows Server 2019, Windows Server 2016
Windows 8.1Windows Server 2012 R2
Windows 8Windows Server 2012
Windows 7Windows 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.

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.

Targeted versions of WindowsEdition(s) of Visual Studio
Windows 11, version 21H2
Windows Server 2022
Windows 10, version 2004
Windows 10, version 1903
Visual Studio Community 2019
Visual Studio Professional 2019
Visual Studio Enterprise 2019
Windows 10, version 1809
Windows 10, version 1803
Windows 10, version 1709
Visual Studio Community 2017
Visual Studio Professional 2017
Visual Studio Enterprise 2017
Windows 10, version 1703
Windows 10, version 1607
Visual Studio Express 2015 for Desktop
Visual Studio Community 2015
Visual Studio Professional 2015
Visual Studio Enterprise 2015
Windows 8.1 Update
Windows 8.1
Visual Studio 2013
Windows 8Visual 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 Summary 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.

Targeted versions of WindowsVersion of Windows SDK
Windows 10, version 1703Windows SDK for Windows 10.0.15063.468
Windows 10, version 1607Windows SDK for Windows 10.0.14393.795
Windows 8.1Windows SDK for Windows 8.1
Windows 8Windows 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.

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.

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

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:

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).

For more information about the EWDK, see Using the Enterprise WDK.

Versions of WindowsEWDK
Windows 11, version 21H2Windows 11, version 21H2 EWDK
Windows Server 2022EWDK for Windows Windows Server 2022
Windows 10, version 2004EWDK for Windows 10, version 2004
Windows 10, version 1903EWDK for Windows 10, version 1903
Windows 10, version 1809EWDK for Windows 10, version 1809
Windows 10, version 1803EWDK for Windows 10, version 1803
Windows 10, version 1709EWDK 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 1703EWDK for Windows 10, version 1703

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 Cert 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

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

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.

Download the Windows Driver Kit (WDK)

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.

You can either safely dismiss this message, or you can uninstall the WDK and then reinstall the WDK (updated August 19, 2022 to version 10.0.22621.382) using the WDK download link below.

It is still not possible to debug drivers within the Visual Studio interface when using Visual Studio 2022 version 17.2.0 and the Windows 11, version 22H2 WDK (version 10.0.22621.382). To work around the problem, 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 WDK is used to develop, test, and deploy drivers for Windows.

Starting with the Windows 11, version 22H2 release of the WDK and EWDK, the kits support:

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, you will need to 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.

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.

Download and install the Windows 11, version 22H2 WDK

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).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:

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.

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:

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 2: Install Windows 11, version 22H2 SDK

This SDK must be installed separately until available through Visual Studio

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Step 3: Install Windows 11, version 22H2 WDK

The WDK Visual Studio extension is included in the default WDK installation.

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.

Windows driver kit. download install. Windows driver kit фото. Windows driver kit-download install. картинка Windows driver kit. картинка download install. 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).Windows 11, version 22H2 EWDK with Visual Studio Build Tools

You can use the Visual Studio interface with the build tools provided in the EWDK.

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:

ВДТФ Быстрое начало

комплект драйверов Windows предоставляет интегрированное решение для написания, развертывания и выполнения тестов, использующих платформу тестирования драйверов Windows (вдтф). С помощью WDK можно настроить удаленный компьютер для развертывания, тестирования и отладки драйвера. при настройке удаленного компьютера устанавливается среда выполнения платформы тестирования Windows Driver.

Установка библиотеки среды выполнения ВДТФ

установка библиотеки среды выполнения вдтф с помощью Visual Studio и WDK

установите Visual Studio а затем установите WDK.

при настройке тестового компьютера устанавливается среда выполнения платформы тестирования Windows Driver.

Установка библиотеки среды выполнения ВДТФ вручную

при установке WDK также устанавливается пакет установки для среды выполнения платформы тестирования драйвера Windows. Необходимо скопировать пакет установки на тестовый компьютер и выполнить команду. Дополнительные сведения см. в разделе Установка библиотеки среды выполнения Вдтф вручную на тестовом компьютере (альтернативный метод) в библиотеке времени выполнения вдтф.

Написание тестов с помощью ВДТФ

WDK предоставляет шаблоны для написания тестов с помощью ВДТФ. См. статью как написать тест драйвера с помощью шаблона тестирования драйвера. Вы также можете использовать шаблон для создания ВДТФ простого подключаемого модуля ввода-вывода для целевого устройства. Дополнительные сведения см. в разделе Создание Вдтф простого подключаемого модуля ввода-вывода для устройства.

Выполнение тестов ВДТФ

при сборке теста драйвера в Visual Studio с помощью шаблона тестирования драйвера вдтф новый тест будет доступен для развертывания на тестовом компьютере. По умолчанию создаваемые тесты будут отображаться в категории тест Категория » Моя проверка«. имена тестов основаны на выбранных тестовых случаях, и они будут иметь такие имена, как Plug and Play неожиданно удалить тест. Во время каждой сборки теста тесты будут перезаписаны и доступны для выполнения в функции быстрого запуска тестов. Дополнительные сведения см. в статье Проверка драйвера во время выполнения с помощью Visual Studio.

Install the Windows ADK offline

To install the Windows ADK on a PC that does not have Internet access, first download the installer files on a PC that has internet access. Next, copy the installer files to a location that is accessible to the offline computer. Then run ADKSetup.exe using either the GUI or the command line.

Using the GUI

The success of this step requires that you run ADKSetup.exe on a computer with an Internet connection and without a copy of Windows ADK installed. If you have Windows ADK installed and do not wish to uninstall it, consider following the instructions in the «Using the command line» section below instead.

Using the command line

If you have a scenario where you need to silently install the Windows ADK, you can install using the command line.

On a PC that has Internet access, see Download and install the Windows ADK.

Click one of the links to download the ADK version you desire, and Save adksetup.exe to a location on your computer.

Open a Command Prompt window as administrator.

Change to the directory that stores the Adksetup.exe file:

Run adksetup.exe. Use /quiet to run the installer silently. Use /layout to specify where the offline install files will be copied to.

Copy the downloaded files to a location that the offline computer can access. For example, copy the files to removable media or to a file server that the offline computer can access.

On the offline computer, open a Command Prompt window as an administrator.

Testing a Driver

The WDK adds a driver testing interface to Visual Studio that allows you to build, deploy, install, and test a driver on a remote test computer on your network. The WDK also provides a collection of device driver tests that you can use to test features and functions of your driver. You can also write customize or write your own driver tests using the Driver Test Template in Visual Studio.

Video Demonstration

This video demonstrates the how to run driver-related tests in a test group.

This section describes some strategies for testing driver, and information about how you select and configure a remote computer to use for testing.

To prepare a driver for public distribution, you should run the Windows Hardware Certification Kit (HCK). For information about the Windows Certification program and how to obtain the HCK, see Windows Hardware Certification Program.

The WDK provides the test binaries and tools which make it easy to run the Device Fundamentals tests from the command-line. For more information, see Run the DevFund Tests via the command-line.

When should you start testing? As soon as you have the requirements for your driver, you can begin to design test cases to test that the critical requirements have been implemented. Studies show that finding and fixing defects in code becomes more expensive the longer the defects remain in the code. Finding and fixing defects early in the development cycle is less costly and disruptive than finding defects after the code has been released and distributed. Creating your test cases early can also help you find problems in your design.

The WDK extensions to Visual Studio provide a device testing interface that enables you to conveniently build, deploy, install, and test a driver on a test computer on your network. The WDK provides a collection of device driver tests that you can use to test the features and functions of your driver.

You can use the Windows Driver Kit (WDK) for WindowsВ 8 to create your own driver tests or to customize some of the tests that are provided. You can deploy the tests that you create to remote test computers using the driver testing framework that the WDK provides for Microsoft Visual Studio UltimateВ 2012.

WDTF Quick Start

The Windows Driver Kit provides an integrated solution for writing, deploying, and running tests that use the Windows Driver Test Framework (WDTF). Using the WDK, you can configure a remote computer for deploying, testing, and debugging a driver. When you configure the remote computer, the Windows Driver Test Framework runtime is installed.

Installing WDTF runtime library

To install WDTF runtime library using Visual Studio and the WDK

Install Visual Studio and then install the WDK.

When you configure the test computer, the Windows Driver Test Framework runtime is installed.

For more information, see:

Installing the WDTF runtime library manually

When you install the WDK, the installation package for the Windows Driver Test Framework runtime is also installed. You need to copy the installation package to a test computer and run a command. For information, see Manually installing WDTF runtime library on a test computer (alternative method) in the WDTF Runtime Library.

Writing tests with WDTF

The WDK provides templates for writing tests with WDTF. See How to write a driver test using a Driver Test template. You can also use a template to create a WDTF Simple I/O plug-in for your target device. For information, see Writing a WDTF Simple I/O plug-in for your device.

Running WDTF tests

When you build your driver test in Visual Studio using a WDTF Driver test template, the new test will be available for deployment to a test computer. By default, the tests that you create will appear in the test category My Test Category. The names of the tests are based upon the test cases that you choose, and they will have names such as My Plug and Play Surprise Remove Test. During each build of the test, the tests will be overwritten and available to run in the Easily Run Tests feature. For more information, see How to test a driver at runtime using Visual Studio.

Sample Kernel-Mode Drivers

The WDK provides various sample kernel-mode drivers. After you have installed the WDK, the src\general subdirectory contains sample driver code that is applicable to all kernel-mode drivers. The samples are also maintained online. These samples include the following:

Applies the DCH design principles (Declarative, Componentized, and Hardware Support Apps [HSA]). You can use it as a model for your own Windows Driver package.

This sample demonstrates how to write driver for a generic PCI device using Windows Driver Framework.

This sample demonstrates how to create a custom media source and driver package that can be installed as a Camera and produce frames.

This sample demonstrates the usage of V3 System DMA. It shows how a driver could use a system DMA controller supported by Windows to write data to a hardware location using DMA.

Demonstrates techniques that kernel-mode drivers can use to notify applications of hardware events, if the application requests notification. One technique uses event objects and the other relies on queuing the notification request until an event occurs.

The FileHistory sample is a console application that starts the file history service, if it is stopped, and schedules regular backups. The application requires, as a command-line parameter, the path name of a storage device to use as the default backup target.

Demonstrates how drivers should support I/O control codes.

The ObCallback sample driver demonstrates the use of registered callbacks for process protection. The driver registers control callbacks which are called at process creation.

This sample demonstrates how to write a KMDF driver for a PCI device. The sample works with the Intel 82557/82558 based PCI Ethernet Adapter (10/100) and Intel compatibles.

The Kcs sample driver demonstrates the use of the kernel-mode performance library.

The RegFltr sample shows how to write a registry filter driver.

Provides sample code for a set of drivers that conform to the Windows Driver Model (WDM). This sample also includes sample installation software.

This sample demonstrates how to use version 1 of the User-Mode Driver Framework to write a minimal driver.

Firefly KMDF filter driver for a HID device Along with illustrating how to write a filter driver, this sample shows how to use remote I/O target interfaces to open a HID collection in kernel-mode and send IOCTL requests to set and get feature reports, as well as how an application can use WMI interfaces to send commands to a filter driver.

Other subdirectories of the \src directory contain sample code for kernel-mode drivers for various types of hardware.

Введение в WDM

В этом разделе содержатся рекомендации по драйверам WDM, которые больше не являются рекомендуемой моделью драйверов. Рекомендации по выбору модели драйвера см. в разделе Выбор модели драйвера.

чтобы позволить разработчикам драйверов создавать драйверы устройств, совместимые с исходным кодом во всех операционных системах Microsoft Windows, был введен WDM (WDM). Драйверы в режиме ядра, которые следуют правилам WDM, называются драйверами WDM.

Все драйверы WDM должны выполнять следующие действия:

Включите WDM. h, а не Нтддк. h. (Обратите внимание, что WDM. h является подмножеством Нтддк. h.)

Должен быть разработан как драйвер шины, драйвер функции или драйвер фильтра, как описано в разделе Типы драйверов WDM.

Следует ли писать драйвер WDM?

При написании нового драйвера рассмотрите возможность использования платформы драйверов режима ядра (кмдф). КМДФ предоставляет интерфейсы, которые проще использовать, чем интерфейсы WDM.

Не создавайте драйвер WDM, если драйвер будет вставлен в стек драйверов, не использующих WDM. Ознакомьтесь с документацией по типам устройств, предоставляемым корпорацией Майкрософт, чтобы определить, как новые драйверы должны взаимодействовать с драйверами, предоставляемыми корпорацией Майкрософт. Дополнительные сведения о конкретных типах устройств см. в разделе технологии устройств и драйверов.)

Источники:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

TopicDescription