我怎样才能用Visual Studio建立一个驱动程序?[英] how can i build a driver using visual studio?

本文是小编为大家收集整理的关于我怎样才能用Visual Studio建立一个驱动程序?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

本文来自:IT宝库(https://www.itbaoku.cn)

有人有文章如何做吗?

推荐答案

由于您没有给您确切的Visual Studio版本,让我给您我知道的选项.

Visual Studio 2012,2013和2015

各自的当代DDK/WDK版本: wdks 8、8.1和10(截至撰写本文时).

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

但是,虽然Visual Studio 2017在此更新时已经存在于次要版本15.4中,但WDK Still 需要 Visual Studio 2015.

Visual Studio 2002至2010

各自的当代DDK/WDK版本:Windows XP/2003服务器的 DDK,Windows Vista的WDK和Windows 7具有各自的服务包级别和相应的服务器版本.

>

这些版本不是 Microsoft正式支持驱动程序.编译驾驶员的唯一最糟糕的选择是完整的第三方工具链(除了由MS批准的Irir,IIRC批准的Intel的C编译器).

在此期间使用Visual Studio编译器被认为是非常糟糕的形式,并明确建议使用Microsoft.但是,一旦皱着眉头,在内核模式下的C ++现在提供了内核模式的C ++框架.他们正在改变...;)

无论如何,解决方法以 a href =" http://www.osronline.com/article.cfm?article=43" rel =" nofollow noreferrer"> ddkbuild.cmd 使用DDK工具链,但有效地允许您整合所得的结果在Visual Studio中从您的" Make"项目中调用. ddkwizard 是针对这两个脚本的项目创建向导. ddkwizard do 支持Visual Studio 2010!指向两个脚本的链接提供了一个很好的文档,并且DDKwizard还带有一个不错的文档.

据我所知

visualddk VirtualKd 比上述要晚出来的,但应被认为是是一种优越,更复杂的解决方案.但是您的里程可能会有所不同.无论哪种情况,在后一种解决方案中,整合到视觉工作室都更加完整.

Visual Studio 6

各自的当代DDK/WDK版本:Windows NT 4和Windows 2000的 ddks.

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

其他推荐答案

下载并安装 visualdddk ,您将能够直接创建驱动程序项目和调试驱动程序来自Visual Studio.

其他推荐答案

如果要使用ddk build和wdk使用 ddkbuild.cmd 来自OSR.

本文地址:https://www.itbaoku.cn/post/1875625.html

问题描述

does anyone have an article how to do this ?

推荐答案

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

Visual Studio 2012, 2013 and 2015

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

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

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.

Visual Studio 2002 through 2010

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.

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

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

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.

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

Visual Studio 6

Respective contemporary DDK/WDK versions: DDKs for Windows NT 4 and 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.

其他推荐答案

Download and install VisualDDK and you'll be able to create driver projects and debug drivers directly from Visual Studio.

其他推荐答案

If you want to use DDK build and WDK use ddkbuild.bat, it is pretty good (I think most of it works still) that should have you going. Alternatively check out ddkbuild.cmd from OSR.