如何使用Visual Studio构建驱动程序? [英] how can i build a driver using visual studio?

查看:260
本文介绍了如何使用Visual Studio构建驱动程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人有文章怎么做吗?

推荐答案

由于您没有提供确切的Visual Studio版本,因此让我为您提供我所知道的选项.

Since you gave no exact version of Visual Studio, let me give you the options I am aware of.

当代DDK/WDK的各个版本: WDK 8、8.1和10(在撰写本文时).

Respective contemporary DDK/WDK versions: WDKs 8, 8.1 and 10 (as of this writing).

使用Windows 8的WDK,Microsoft的WDK团队终于再次直接从Microsoft提供了与Visual Studio的完全集成.

With the WDK for Windows 8, the WDK team at Microsoft finally offers full integration with Visual Studio again directly from Microsoft.

但是,尽管在更新之时Visual Studio 2017已存在次要版本15.4,但WDK仍需要 Visual Studio 2015.

However, while Visual Studio 2017 exists in minor version 15.4 already by the time of this update, the WDK still requires Visual Studio 2015.

当前DDK/WDK的各个版本:用于Windows XP/2003 Server的DDK,用于Windows Vista和Windows 7的WDK及其相应的Service Pack级别和相应的服务器版本.

Respective contemporary DDK/WDK versions: DDKs for Windows XP/2003 Server, WDKs for Windows Vista and Windows 7 with their respective service pack levels and the respective server versions.

Microsoft官方支持这些版本以构建驱动程序.编译驱动程序的唯一较差的选择是完整的第三方工具链(除了受MS,IIRC认可的Intel C编译器之外).

Those versions were not officially supported by Microsoft to build drivers. The only worse choice to compile a driver would be a complete third-party toolchain (other than Intel's C compiler which was sanctioned by MS, IIRC).

在此期间,使用Visual Studio编译器被认为是非常糟糕的形式,Microsoft明确建议不要使用它.但是,内核模式下的C ++也曾一度不受欢迎,现在MS为内核模式提供了C ++框架.他们改变的时代...;)

It was considered very bad form to use the Visual Studio compilers during that period, and Microsoft explicitly recommended against it. However, C++ in kernel mode was also once frowned upon and now MS provides C++ frameworks for kernel mode. The times they are changin' ... ;)

无论如何,变通办法以 ddkbuild.bat ddkbuild.cmd ,它使用DDK工具链,但是有效地允许您集成结果从Visual Studio中的"make"项目中调用. DDKWizard 是这两个脚本的项目创建向导. DDKWizard 不支持Visual Studio 2010!这两个脚本的链接提供了不错的文档,而DDKWizard也附带了不错的文档.

Anyway, workarounds exist in the form of ddkbuild.bat and ddkbuild.cmd which use the DDK toolchain, but effectively allow you to integrate the resulting invocation from your "make" project inside Visual Studio. DDKWizard is a project creation wizard for both of those scripts. DDKWizard does not support Visual Studio 2010! The links to the two scripts provide a good documentation and DDKWizard also comes with a decent documentation.

据我所知ddkbuild.cmd最初是基于ddkbuild.bat的,并且HollisTech版本也可以从OSR追溯到该版本.

To my knowledge ddkbuild.cmd is originally based on ddkbuild.bat and the HollisTech version can also trace its heritage back to that version from OSR.

VisualDDK VirtualKD 的出现晚于上述提到的时间,但它被认为是更为优越,更复杂的解决方案.但是您的里程可能会有所不同.无论哪种情况,在后一种解决方案中,与Visual Studio的集成都将更加完整.

VisualDDK combined with VirtualKD emerged later than the aforementioned, but is to be considered a far superior, more sophisticated solution. But your mileage may vary. In either case the integration into Visual Studio is far more complete in the latter solution.

当代DDK/WDK的各个版本:用于Windows NT 4和Windows 2000的DDK.

Respective contemporary DDK/WDK versions: DDKs for Windows NT 4 and Windows 2000.

在Windows XP DDK(现在将DDK称为WDK)之前,DDK中未包含编译器,因此必须安装编译器工具链.对于NT 4.0和Windows 2000就是这种情况.

Prior to the Windows XP DDK (now DDK is called WDK) the compiler was not included in the DDK, so you had to have the compiler toolchain installed. This would be the case for NT 4.0 and Windows 2000.

这篇关于如何使用Visual Studio构建驱动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆