VS2008、DDK XP和DDKWizard搭建驱动开发环境 .

学习Windows开发,搜集资料配置完成开发环境,现整理如下:
 
1. 安装VisualStudio 2008。(网上免费现在多多不用提供链接)
2. 默认目录下安装DDK XP。(下载地址: http://download.microsoft.com/download/9/0/f/90f019ac-8243-48d3-91cf-81fc4093ecfd/1830_usa_ddk.iso
3. 安装ddkwizard_setup(下载地址: http://ddkwizard.assarbad.net/ ),默认安装,一路Next点过即可。
4. 将ddkbuild.cmd,ddkbuild.bat(下载地址:http://ddkwizard.assarbad.net/ )拷贝到特定DDK版本安装的父目录下,例如,我的DDK XP的安装目录F:\WINDDK\3790.1830,   就将ddkbuild.cmd,ddkbuild.bat拷贝到F:\WINDDK目录下。
5. 添加“系统变量”WXPBASE,设置值为“F:\WINDDK\3790.1830”。具体步骤略。
6. 打开VS2005/2008。“工具”->“选项”->“项目和解决方案”->“VC++目录”,按照右上角的内容进行     

环境已经搭建完成,现在我们来创建一个Driver工程。

1. 新建一个项目,选择“DDK Project”,模板选择“Driver”。

2. 设置工程属性。根据操作系统选择DDK的版本,一般高版本的DDK都向下兼容,也就是包含低版本操作系

   统所对应的DDK,所以本文中选择的win2003版本的DDK肯定支持XP操作系统。左下角选择第3、4项。 

3.“Finish”之后,VS2005\2008就直接生成一个驱动框架,提供了最基本的入口函数和派遣函数。这就像

   用VS2005\2008生成一个MFC框架一样。

4. 现在就可以直接进行编译。编译结果如下。

1>------ 已启动生成: 项目: Driver1.WXP, 配置: WXP checked Win32 ------

1>正在执行生成文件项目操作

1>OSR DDKBUILD.CMD V7.3/r27 (2008-09-06) - OSR, Open Systems Resources, Inc.

1>DDKBLD: >> Setting custom environment variables [ddkbldenv.cmd] ...

1>DDKBLD: << Finished setting custom environment variables [ddkbldenv.cmd] ...

1>DDKBLD: >> Performing pre-build steps [ddkprebld.cmd] ...

1>DDKBLD: New build number is 2 ...

1>DDKBLD: << Finished pre-build steps [ddkprebld.cmd] ...

1>DDKBLD: WXP (checked) using the Windows XP DDK and %WXPBASE%

1>DDKBLD: Directory: F:\开发\projects\驱动\Driver1\Driver1

1>DDKBLD: WXPBASE: F:\WINDDK\3790~1.183

1>DDKBLD: Run build -MI -Ze for checked version in .

1>BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.

1>BUILD: Using 2 child processes

1>BUILD: Object root set to: ==> objchk_wnet_x86

1>BUILD: Compile and Link for i386

1>BUILD: Examining f:\开发\projects\驱动\driver1\driver1 directory for files to compile.

1> f:\开发\projects\驱动\driver1\driver1

1>BUILD: Compiling (NoSync) f:\开发\projects\驱动\driver1\driver1 directory

1>Compiling - drvversion.rc for i386

1>Compiling - driver1.cpp for i386

1>BUILD: Compiling  f:\开发\projects\驱动\driver1\driver1 directory

1>BUILD: Linking f:\开发\projects\驱动\driver1\driver1 directory

1>Linking Executable - objchk_wnet_x86\i386\driver1.sys for i386

1>BUILD: Done

1> 3 files compiled - 1 Warning

1> 1 executable built

1>DDKBLD: Build complete

1>DDKBLD: Building browse information files

1>DDKBLD: >> Performing post-build steps [ddkpostbld.cmd] ...

1>DDKBLD: << Finished post-build steps [ddkpostbld.cmd] ...

1>生成日志保存在“file://f:\开发\projects\驱动\Driver1\Driver1\BuildLog.htm”

1>Driver1.WXP - 0 个错误,个警告

========== 生成: 1 已成功, 0 已失败, 0 最新, 0 已跳过==========

 参考地址:

http://blog.csdn.net/qingruo_yin/article/details/6400133

http://blog.sina.com.cn/s/blog_60a1a51d0100e1hk.html

http://c.yegeer.com/item/38655131

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 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、付费专栏及课程。

余额充值