What is windows ddk

Windows Programming/The DDK

Contents

What it is [ edit | edit source ]

The Windows DDK comes on CD with a number of different options. Specifically, the DDK is capable of writing device drivers for a number of different platforms (Win9x, WinNT, WinServer), and is capable of targeting several different processors (IA-32, IA-64, and Itanium). Installing the necessary components for every platform on every processor can take up a lot of harddisk space. In addition, the DDK comes with many examples of how to write everything from parallel port controllers to file system drivers, display drivers, and ethernet drivers. Installing all the examples can also take up a large amount of disk space.

Checked and Free Environments [ edit | edit source ]

The DDK comes with a number of different batch files, that will create a suitable driver programming environment. The different batch files will create an environment to program for a specific OS/Processor combination. Each different environment will set a number of global variables that the compiler and linker will read to make decisions about the code generation. Compiling a driver using the wrong environment will lead to a driver that may not be compatible with your system (and may destabilize your computer).

For each target platform, there are two environments available: checked and free. The Checked environment is essentially a debug environment, that will add additional debugging bloat to your compiled drivers, and will perform additional error checking and warnings. The Free environment, however, does not contain any debugging information, and should only be used to compile a fully-debugged device driver.

The Tools [ edit | edit source ]

The DDK comes with the compiler: cl.exe, the linker: link.exe, and an assembler: ml.exe. When writing device drivers, it is recommended that you only use these particular files, and that you do not use any other versions of these programs that you may have on your computer (either from the SDK or Visual Studio). The DDK will also come with a number of header files. Some of the header files you may be familiar with, but some of them will contain function prototypes for kernel-mode libraries, that most programmers are unfamiliar with.

Opaque Members [ edit | edit source ]

The DDK defines a number of different data structures for use in device drivers. However, because drivers operate at kernel mode, it is important to realize that many of the fields of these structures are for use only internally to the kernel, and your driver should not alter them. These data fields are known as «Opaque» members of the structure, and should be treated as if they were a «protected» or «private» member of a C++ class. Data fields that are not explicitly mentioned in this Wikibook should be considered suspect, and if there are any outstanding questions about the availability and use of a particular data field, consult MSDN or the DDK documentation.

Warning [ edit | edit source ]

Device drivers should always be thoroughly debugged before installing on a system. If a faulty device driver is installed in the system, it could compromise the kernel at boot, making the entire system unstable, if not completely unusable. Uninstalling a faulty driver can be difficult, especially if you need to perform a rescue boot operation on your computer. Device drivers should be written with care, and fully debugged before installing.

Комплект драйверов Windows — Windows Driver Kit

Комплект драйверов Windows
Разработчики) Microsoft
Начальная версия 1992 ; 29 лет назад ( 1992 )
Стабильный выпуск
Операционная система Майкрософт Виндоус
Доступно в английский
Лицензия Проприетарное коммерческое программное обеспечение
Веб-сайт документы .microsoft .com / en-us / windows-hardware / drivers / index

Driver Kit для Windows ( WDK ) представляет собой программный набор инструментов от Microsoft , что позволяет разрабатывать драйверы устройств для Microsoft Windows платформы. Он включает документацию, образцы, среды сборки и инструменты для разработчиков драйверов. Для полного набора инструментов для разработки драйверов также потребуется следующее: компилятор Visual Studio , Windows SDK и Windows HLK .

СОДЕРЖАНИЕ

История

Ранее WDK назывался комплектом разработки драйверов (DDK) и поддерживал разработку модели драйверов Windows (WDM). Свое нынешнее название он получил, когда Microsoft выпустила Windows Vista и добавила в комплект следующие ранее разделенные инструменты: Installable File System Kit (IFS Kit), Driver Test Manager (DTM), хотя DTM позже был переименован и снова удален из WDK.

Читайте также:  Install linux bootloader from windows

DDK для Windows 2000 и более ранних версий не включает компилятор; вместо этого вам нужно было установить Visual C ++ отдельно для компиляции драйверов. Начиная с версии для Windows XP, DDK и более поздние версии WDK включают компилятор командной строки для компиляции драйверов. Одна из причин, по которой Microsoft указала на включение компилятора, заключалась в том, что качество драйверов улучшилось бы, если бы они были скомпилированы с той же версией компилятора, которая использовалась для компиляции самой Windows, в то время как Visual C ++ нацелен на разработку приложений и имеет другой цикл продукта. с более частыми изменениями. Серия WDK 8.x и более поздние восходит к требованию отдельной установки согласованной версии Visual Studio , но на этот раз интеграция более полная: вы можете редактировать / создавать / отлаживать драйвер напрямую из Visual Studio.

Версии DDK

Версия Номер сборки Дата выпуска
Windows 3.0 DDK 1990 г. ( 1990 )
Windows 3.1 DDK 1992 г. ( 1992 )
Windows NT 3.1 DDK 1993 г. ( 1993 )
Windows NT 3.5 DDK 1994 г. ( 1994 )
Windows NT 3.51 DDK 1025,1 Июль 1995 г. ( 1995-07 )
Windows 95 DDK Октябрь 1995 г. ( 1995-10 )
Windows 95 DDK a Июнь 1996 г. ( 1996-06 )
Windows 95 DDK b
Windows 95 DDK c (MSDN, июль 1998 г.) Июнь 1998 г. ( 1998-06 )
Windows NT DDK (для Windows NT Workstation 3.51) Июль 1996 г. ( 1996-07 )
Windows NT DDK (для Windows NT Workstation 4.0) 1381,1 Август 1996 г. ( 1996-08 )
Windows 98 DDK Июль 1998 г. ( 1998-07 )
Windows 98 SE DDK Май 1999 г. ( 1999-05 )
Windows 2000 DDK 2195,1 Февраль 2000 г. ( 2000-02 )
Комплект разработчика драйверов для Windows XP (DDK) 2600 21 сентября 2001 г. ( 2001-09-21 )
Комплект разработчика драйверов Windows XP SP1 (DDK) 2600.1106 14 ноября 2002 г. ( 2002-11-14 )
Windows Server 2003 DDK 3790 9 апреля 2003 г. ( 2003-04-09 )
Windows Server 2003 с пакетом обновления 1 DDK 3790.1830 6 апреля 2005 г. ( 2005-04-06 )

Примечание. Windows NT DDK, Windows 98 DDK и Windows 2000 DDK больше не предоставляются Microsoft из-за соглашений, связанных с Java, сделанных Microsoft с Sun Microsystems.

What is windows ddk

Статьи этого раздела описывают примеры и технологию разработки драйверов для ОС Windows XP. Т.е. в каком-то смысле данный материал следует рассматривать как «археологический».

Прежде чем погружаться в дебри программирования драйверов, нам сначало надо подготовить себе среду для работы, подготовить инструментарий так сказать. Наверное, те читатели которые уже пытались побороться с драйверами, слышали о неком DDK или Driver Development Kit, если расшифровать сокращение. Этот DDK и есть то средство без которого мы ничего сделать не сможем. В состав комплекса входят:

  • собственно сам компилятор, который из написанного нами кода сделает драйвер
  • файлов справки и примеров написанных драйверов (необольщайтесь, чтобы разобраться с каждым из примеров, уже подготовленному программисту надо потратить 1-2 недели, а лезть туда новичку вообще гиблое дело — желание изучать программирование драйверов пропадет сразу. Это обусловлено тем, что все примеры представляют из себя просто исходный код с коротеньким пояснением что этот драйвер делает.)
  • дополнительных программ, которые могут пригодиться при отладке и тестировании драйверов

Хочу сразу огорчить, сообщив что компилятор DDK не является удобной визуальной средой программирования, как например Visual Studio C++. Общение с ним выливается в работу с командной строкой. И вообще приготовтесь к тому, что программировать драйвера в DDK не самое простое и удобное занятие.

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

140 MБ, из-за чего этот путь добычи некоторых читателей может не устроить. В свое время он меня тоже не устроил (у меня тогда еще телефонный модем стоял) и я пошел копаться по рынкам. Найти диск DDK оказалось нет просто, как я думал. Слишком тематика узкая. Вот например, что-нибудь типа «Windows для начинающих» или «Office для чайников» — это пожалуйста, а DDK я пол дня искал — случайно на Савеловском нашел.

Обратите внимание! Нам нужен DDK XP, который предназначен для Windows 2000, XP а не DDK 98, который работает для 98, Me.

Итак, надеюсь, что Вы раздобыли диск DDK XP. Теперь давайте установим этот «чудо» программный продукт от Microsoft на свой компьютер.

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

Конечно же соглашаемся с лицензионным соглашением и опять нажимаем Далее.

Здесь выбираем путь установки DDK. По умолчанию комплекс уснанавливается в корневой каталог в папку WINDDK. Менять ничего не будем. Ставим как есть. Нажимаем Далее.

Читайте также:  Linux удалить файлы по маске во всех подпапках

Здесь можно управлять комплектацией установки. Обязательно поставьте галочки во всех пунктах утсановки, поскольку исходная конфигурация не предусматривает установку примеров. Нажимаем Далее.

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

После этого начнется процесс копирования файлов.

По завершению установки должно появиться окно, показанное ниже, в котором помимо времени затраченного на установку еще будет сообщение об успешной установке DDK. Нажимаем Готово.

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

В директории C:\WINDDK\2600.1106\help\ теперь можно найти справочные файлы по DDK, а в C:\WINDDK\2600.1106\src\ находятся примеры готовых драйверов. Можете попробовать на досуге покопаться там. Не волнуйтесь, если у Вас «глаза на лоб вылезли» после погружения в эти папки. Вы не первый и не последний.

Итак, мы сделали первый шаг на пути к освоению программирования драйверов Windows. Теперь у нас есть все необходимые инструменты для работы с драверами на начальном этапе. В следующей части статьи мы начнем писать наш первый драйвер под Windows XP для управления портами.

Other WDK downloads

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

The Windows Driver Kit (WDK) is used to develop, test, and deploy Windows drivers. 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).

This topic contains information about earlier versions of the WDK, the Enterprise WDK (EWDK), and additional downloads for support purposes. 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, version 1903 WDK on Windows 7 and later, and use it to develop drivers for these operating systems:

Client OS Server OS
Windows 10 Windows Server 2019, Windows Server 2016
Windows 8.1 Windows Server 2012 R2
Windows 8 Windows Server 2012
Windows 7 Windows Server 2008 R2 SP1

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.

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

Targeted versions of Windows Edition(s) of Visual Studio
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 8 Visual Studio Professional 2012
Visual Studio Ultimate 2012

Configure Visual Studio for Windows 10, versions 1709, 1803, 1809 and 1903

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

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

Step 2: Install the WDK

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

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.

Versions of Windows WDK and related downloads
Windows 10, version 2004 WDK for Windows 10, version 2004 (10.1094.1)* See Note below
Windows 10, version 1903 WDK for Windows 10, version 1903
Windows 10, version 1809 WDK for Windows 10, version 1809
Windows 10, version 1803 WDK for Windows 10, version 1803
Windows 10, version 1709 WDK for Windows 10, version 1709
Windows 10, version 1703 WDK for Windows 10, version 1703
Windows 10, version 1607 WDK for Windows 10, version 1607
Windows 8.1 Update WDK 8.1 Update (English only) — temporarily unavailable
WDK 8.1 Update Test Pack (English only) — temporarily unavailable
WDK 8.1 Samples
Windows 8 WDK 8 (English only)
WDK 8 redistributable components (English only)
WDK 8 Samples
Windows 7 WDK 7.1.0

Please review Hardware development kits for Windows 10, Version 2004, 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:

  1. On the Start menu, enter Apps & features in the search box, and select Apps & features from the results.
  2. Find Windows Driver Kit — Windows 10.0.15063.0 in the list of Apps & Features, and then select the program.
  3. Select Modify, select Repair, and then follow the directions on the screen.
  4. The files will be restored.

Optional: Install the EWDK

The Enterprise WDK (EWDK) is a standalone, self-contained, command-line environment for building drivers and basic Win32 test applications. It includes the Visual Studio Build Tools, the SDK, and the WDK. This environment doesn’t include all the features available in Visual Studio, such as the integrated development environment (IDE).

Using the EWDK requires .NET Framework 4.6.1. For more information about which systems run this version of the framework, see .NET Framework system requirements. For links to download the .NET Framework, see Install the .NET Framework for developers.

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

Versions of Windows EWDK
Windows 10, version 1903 EWDK for Windows 10, version 1903
Windows 10, version 1809 EWDK for Windows 10, version 1809
Windows 10, version 1803 EWDK for Windows 10, version 1803
Windows 10, version 1709 EWDK for Visual Studio with Build Tools 15.6 (Recommended)
EWDK for Visual Studio with Build Tools 15.4
EWDK for Visual Studio with Build Tools 15.2
Windows 10, version 1703 EWDK for Windows 10, version 1703

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

If you’re debugging Windows XP, Windows Server 2003, Windows Vista, or Windows Server 2008 (or using one of these operating systems to run Debugging Tools for Windows), you need to use the Windows 7 release of the debugging tools. It’s included in the SDK for Windows 7 and .NET Framework 4.0.

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

Get the standalone debugging tools for Windows XP by first downloading the Windows 7 SDK: Microsoft Windows SDK for Windows 7 and .NET Framework 4.

To install the Debugging Tools for Windows as a standalone component, start the SDK installer, and in the installation wizard, select Debugging Tools for Windows, and clear all other components.

Читайте также:  Usb драйвер lenovo для windows 10
Оцените статью