关于ddk环境的配置

 1.首先下载ddk开发包

Windows DDK 3790.1830 下载

安装DDK后,去http://ddkwizard.assarbad.net/ 下载ddkwizard_setup_v1.2.0a、ddkbuild_bat.zip、ddkbuild_cmd.zip。

2.拷贝 DDKBUILD.bat 和 DDKBUILD.cmd 到DDK安装根目录,如我的是D:/WinDDK.

3.. 将上述文件(DDKBUILD.bat 和 DDKBUILD.cmd )的路径添加到系统的path变量(右击我的电脑,系统属性/高级/环境变量/系统变量/path变量双击修改值)。

4. 根据你所安装的DDK的不同版本添加不同的变量到系统变量中。
  右击我的电脑,系统属性/高级/环境变量/系统变量/新建:
  2000 DDK则变量名为: W2KBASE
  XP DDK则变量名为: WXPBASE
  2003 sp1 DDK则变量名为: WNETBASE
  这里我的是WNETBASE(值为D:/WinDDK/3790.1830)

5.启动vs2008 打开菜单中的工具——选项,弹出选项对话框。选择左边的项目和解决方案——VC++目录,在右边的显示以下内容的目录下拉列表中选择可执行文件,在下面列表框中添加上面DDKBuild.bat文件所在的路径(这里是D:/WinDDK),同样设置包含文件和库文件

设置可执行文件(D:/WinDDK)
设置包含文件(D:/WINDDK/3790.1830/inc/wnet D:/WINDDK/3790.1830/inc/ddk/wnet )
设置库文件(D:/WINDDK/3790.1830/lib/wnet/i386)

6. 开始安装DDKWizard,在安装的最后一步你可以选择编辑ddkwizard的配置文件。

7. 现在重新打开VC2008就会发现在新建项目里面有DDK Project的选项了,里面就可以建立驱动工程来编写驱动程序了。
8. 验证你做的工作,你可以直接新建一个Driver工程按F7编译,编译看看。

这个只是转载csdn上的一篇文章,有一点需要注意的是WNETBASE的值是D:/WinDDK/3790.1830,而不是D:/WinDDK。第一次配置的时候,我就犯了这个错误,然后编译一直都不能通过,报错信息为:
OSR DDKBUILD.CMD V7.3/r27 (2008-09-06) - OSR, Open Systems Resources, Inc.
DDKBLD: >> Setting custom environment variables [ddkbldenv.cmd] ...
DDKBLD: << Finished setting custom environment variables [ddkbldenv.cmd] ...
系统找不到指定的路径。
DDKBLD: >> Performing pre-build steps [ddkprebld.cmd] ...
DDKBLD: << Finished pre-build steps [ddkprebld.cmd] ...
DDKBLD: WNET (checked) using the Windows 2003 Server DDK and %WNETBASE%
DDKBLD: Directory: c:/DOCUME~1/ADMINI~1/MYDOCU~1/VISUAL~1/Projects/acm/EMPTYD~1/EMPTYD~1 + argument(s): -cZ -prefast
DDKBLD: WNETBASE: F:/WINDDK
DDKBLD: Run prefast build -M -Ze -cZ for checked version in .
'prefast' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
DDKBLD: The PREfast logfile is "PREfast_defects_.xml"!
DDKBLD: Build complete
DDKBLD: Building browse information files
DDKBLD: >> Performing post-build steps [ddkpostbld.cmd] ...
DDKBLD: << Finished post-build steps [ddkpostbld.cmd] ...
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
结果
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>生成日志保存在“file://c:/Documents and Settings/Administrator/My Documents/Visual Studio 2008/Projects/acm/EmptyDriver1/EmptyDriver1/BuildLog.htm”
EmptyDriver1.WNET - 0 个错误,0 个警告

  如果你也是这种情况不妨试试。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
DDKWizard is a so-called project creation wizard that allows you to create projects that use the DDKBUILD scripts from OSR (also available in the download section from this site). The wizard will give you several options to configure your project prior to the creation. Have a look at figure 1. Figure 2: Project creation dialog (click to enlarge) Instead of forcing you to use a subset of options and specific DDKs this wizard lets you choose what you want. Of course the template files are predefined and so is the content of the project(s) within certain limits. However, I tried to choose the best options that I could think of and provide a way to create quickly and easily the DDKBUILD project you want. This means that I tried to leave out those things that may limit your choice lateron and add other options that will give you the flexibility to change options quickly long after the project was created. DDKWizard adds a new subfolder in the project creation wizard - see figure 2 - and presents all supported project types there. Currently these are Driver, Empty Driver, Native Application, Win32 console application and Win32 DLL. In either case you just choose the type of project to create, give the name of the project and/or solution as well as other options (at the bottom) and you are being presented the wizard dialog (see figure 1). From the wizard dialog you choose the DDKBUILD script you want to use, the DDK or multiple DDKs as well as the other options. If you are curious about the Property Sheet feature, please download the manual and read the respective section there. Compatibility DDKWizard (1.2.0a) has been tested on the following configurations: Visual Studio Professional .NET with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual Studio Professional .NET 2003 with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual C++ 2005 Express with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual Studio 2005 Professional with WNET DDK and DDKBUILD.CMD on Windows 2003 Server R2 Standard Visual Studio 2008 Professional with WNET DDK and DDKBUILD.CMD on Windows XP From this list one can deduce that it is supposed to also run if you got the respective "non-Express" Visual C++ version. Also if there has been some Visual C++ .NET 2003 Express DDKWizard is prepared for it. Download You could go watch the demo or download right away: Manual: contains the detailed description of how to configure DDKBUILD and use DDKWizard. If you are unsure whether you should download and install DDKWizard grab this file and skim over it. Download: ddkwiz_manual.pdf (~513kB, 2009-12-05@20-11-55, downloaded 31666 times) Installer (incl. manual) of DDKWizard 1.3.0a: this is the setup program which will install DDKWizard along with the manual on your computer and register it with Visual Studio. Download: ddkwizard_setup.exe (~557kB, 2009-12-05@20-12-37, downloaded 72787 times) DDKBUILD.CMD: Stable version 7.4/r60 of OSRs DDKBUILD NT script version. Feedback for this version can be sent to me directly. Download: ddkbuild_cmd.zip (~12kB, 2009-11-28@04-38-36, downloaded 20707 times) DDKBUILD.BAT (obsoleted by the above!): Version 6.12 of OSRs DDKBUILD batch script version. Download: ddkbuild_bat.zip (~6kB, 2008-03-21@15-59-07, downloaded 17226 times) Trunk version of DDKBUILD.CMD The version from trunk is available as well. Please note that this is not necessarily the same version as offered in the ZIP archive above. It may be in a better shape (e.g. reported bugs fixed) or slightly worse (e.g. new feature that is not yet stable). So use this version only if you want to test the latest development version and are able to provide feedback. Here is the link to the prettier ViewVC URL: ddkbuild/trunk - SVN clients get read-only access here. License All projects created by DDKWizard can be put under whatever license you like to put them. The scripts and HTML files which contain the DDKWizard logic are subject to the zlib license starting with version 1.2.0, before it was released under the GPL v2 from 1991. The zlib license is a lot more liberal and allows just about any kind of use for the script and "user interface" part of DDKWizard. The DDKBUILD scripts are mirrored with the permission of OSR. I will try to keep it synchronized at all times. Everything else Contact me here and also visit my blog and my website. Note that I usually announce new versions of DDKWizard and DDKBUILD on my blog - you also might want to subscribe to the RSS feed for DDKWizard and DDKBUILD. This page will be extended whenever I deem it necessary.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值