找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 257|回复: 4

[教程]使用VS2022+WDK11开发驱动

[复制链接]

856

主题

2630

回帖

2

精华

管理员

此生无悔入华夏,  长居日耳曼尼亚。  

积分
36108
发表于 2024-10-22 18:03:44 | 显示全部楼层 |阅读模式
在8年前,我写过一篇《使用VS2015+WDK10开发驱动》的教程。如今WIN11的稳定版(LTSC)已经发布了,那么开发环境也应该更新换代了。随着微软文档的完善,如今配置开发环境不再需要请教老师傅了,直接看官方文档即可获得答案。跟以前不同的是,现在微软不再提供Visual Studio的ISO安装包了,需要联网安装。Visual Studio Community是免费的,但安装后需要登录微软账号激活,否则30天后无法使用。微软仍然提供WINDOWS SDK的ISO安装包,以及WINDOWS DRIVER KIT的ISO安装包完整内容下载(但需要你自己打包成ISO)。
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, then under Individual Components add:
  • MSVC v143 - VS 2022 C++ ARM64/ARM64EC Spectre-mitigated libs (Latest)
  • MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs (Latest)
  • C++ ATL for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC)
  • C++ ATL for latest v143 build tools with Spectre Mitigations (x86 & x64)
  • C++ MFC for latest v143 build tools with Spectre Mitigations (ARM64/ARM64EC)
  • C++ MFC for latest v143 build tools with Spectre Mitigations (x86 & x64)
  • Windows Driver Kit

Tip: Use the Search box to look for "64 latest spectre" (in English installations) or "64 latest" (in non-English installations) to quickly see these components.
Note: The Desktop development with C++ workload selected above does not install the Windows SDK 10.0.26100.1.


Step 2: Install SDK
Installing Visual Studio will not download the latest SDK version, use the following link to install
The provided links for the SDK and the WDK have matching build numbers, which is always required for the kits to work together. If you decide to install your own SDK/WDK pair, perhaps for a different Windows version, ensure that the build numbers match. For more details, see Kit versioning.


Step 3: Install WDK
The WDK Visual Studio extension is included in the default WDK installation.
In Visual Studio versions 17.11.0 and later, the WDK extension should be installed with Visual Studio. However, the WDK installer settings still show the checkbox for the VSIX extension installation.  You need to deselect this checkbox to prevent an install failure.

Tip: If you can't find driver project templates in Visual Studio, the WDK Visual Studio extension didn't install properly. To resolve this, launch Visual Studio Installer, click "Modify", add "Windows Driver Kits" in the Individual Component tab and Click "Modify".

依次安装好VS2022社区版、WINDOWS SDK 26100、WINDOWS DRIVER KIT 26100之后,打开VS2022,新建一个“Empty WDM Driver”工程,就可以开始写驱动了。剩下的工程设置操作,参考我8年前的帖子即可。可惜的是,有消息人士透露:
游客,如果您要查看本帖隐藏内容请回复

3

主题

117

回帖

0

精华

铜牌会员

积分
286
发表于 2024-10-24 03:28:37 | 显示全部楼层
看看透露了什么

0

主题

67

回帖

0

精华

铂金会员

积分
2141
发表于 2024-10-24 07:01:53 | 显示全部楼层
还有什么东西!

77

主题

192

回帖

9

精华

贵宾会员

积分
15602
发表于 2024-10-24 11:51:23 | 显示全部楼层
用Rust开发驱动吧,只需要一个vscode,连微软账号都不需要了

0

主题

87

回帖

0

精华

金牌会员

积分
1046
发表于 2024-11-26 20:32:16 | 显示全部楼层
看看有没什么变化
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

快速回复 返回顶部 返回列表