VS2005+WDK+DriverStudio

配置一个好的开发环境是学习驱动开发的第一步,我在这里介绍一下VS2005+DDK2003+DriverStudio3.2配置过程,我在这里给大家一个step by step的。好了,废话不多说了,让我们开始吧!

step1:
就从下载软件开始吧,VS2005 DDK2003 DriverStudio3.2这几个就不用说了,迅雷上都有下载。 还有两个补丁,分别是:
下载ds3.2.1补丁,按照提示安装
    ftp://ftp.compuware.com/pub/driverstudio/outgoing/patch/DS3.2.1.zip

Host

(1).     Copy the files osinfo.dat and osinfob.dat from the host directory into the following directories.

                    <Install Directory>\Compuware\DriverStudio

                    < Install Directory>\Compuware\DriverStudio\VisualSoftICE

    (2).     Copy the file DS.exe the host directory into the following directory

                    <Install Directory>\Compuware\DriverStudio

 Target

(1).     Copy all the .sys and all the .dat files found in the root of the target directory to the system32\drivers directory.

(2).     Copy the siksym.sys from the appropriate subdirectory (IA64, AMD64 or X86) into the system32 drivers directory. Note: only copy the one that applies to that specific target.


          下载DSDDKEnv.zip补丁,一定按照提示安装注册否则出现错误提示(在一个头文件中出现错误,位置处有WIN...>501类似的文字)
        ftp://ftp.compuware.com/pub/driverstudio/outgoing/patch/DSDDKEnv.zip

  (1)Close all development environment windows.

  (2)Copy the file DSDDKEnv8.dll into the <INSTALL_DIR>\DriverStudio\Common\Bin directory. Select "yes" if prompted to copy over an existing one.

  (3)   Copy the file DSDDKEnv8UI.dll into the <INSTALL_DIR>\DriverStudio\Common\Bin\1033 directory. Select "yes" if prompted to copy over an existing one.

  (4)   Then unregister the older version. Go to start->run and type "regsvr32 -u <INSTALL_DIR>\DriverStudio\Common\Bin\dsddkenv8.dll"

  (5)  Then register the new copy. Go to start->run and type "regsvr32 "<INSTALL_DIR>\DriverStudio\Common\Bin\dsddkenv8.dll"

这里,需要注意的是。<INSTALL_DIR>不能有空格,即DriverStudio不能安装在文件名含空格的

 

文件夹中。

step2:
安装完成后,修改VS2005如下:
在vs2005 ->Tools-> Options ->Projects and solutions -> vc++ Directories ->
     include files 添加 ddk安装目录下的inc文件夹下的 ddk文件夹
     library files 添加   ddk 安装目录下的lib文件夹下的 wxpi386文件夹


step3:
打开DriverStudioDriverWizardTemplates目录的WdmDriver.sln.net文件找到“Microsoft Visual Studio Solution File, Format Version 9.00”这一行,在其后下一行加入“# Visual Studio 2005”保存即可,以后用DriverWizard生成的工程就可以正常双击打开了。
修改后象这样:
...
$$FILE $$ProjectName$$.sln
$$IFDEF GENERATE_SLN2002
Microsoft Visual Studio Solution File, Format Version 7.00
$$ENDIF
$$IFDEF GENERATE_SLN2003
Microsoft Visual Studio Solution File, Format Version 8.00
$$ENDIF
$$IFDEF GENERATE_SLN2005
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
$$ENDIF
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "$$ProjectName$$", "Driver$$ProjectName$$.vcproj", "$$ProjectGuid$$"
EndProject

step4:
所有程序-〉compuware DriverStudio->develope->DDK Build Setting
ddk root directory 选择DDK2003安装路径 如 D:WINDDK3790.1218

OK!
当然补丁的安装在补丁中有文档介绍了,照它的操作就好了。
 
PS:
关于Driver Studio 3.2 的安装详解
经过对VC、WINDDK、Driver Studio这三个软件反复的安装,终于可以使Driver Studio能在VC环境下正常编译了。俗话说久病成医,遇到的问题多了,自然就有了很多解决问题的方法,现在拿出来和大家一起分享一下。
1、分别安装VC、WINDDK、Driver Studio,为:VC-〉WINDDK-〉 Driver Studio。其实顺序也可以变一下的,笔者曾试过VC-〉 Driver Studio -〉WINDDK,没问题的,但最好按建议顺序安装;
2、注意安装DDK时,建议将例子等全部安装,否则Driver Studio编译时会提示缺少头文件;
3、在VS2005环境下,安装Driver Studio时会有对话框弹出,单击Ignore按钮,解决办法会在后面详细说明;
4、选择“DriverStudio->DDK Build Setting”,在“DDK Root Directory”选项中选入DDK目录,例如“C:\WINDDK\2600”。为了防止每次启动VC来编译WDM时,都要设置DDK目录,可以在“控制面板”的“系统”-〉“高级”-〉“环境变量E”设置中,添加一个值为C:\WINDDK\2600的系统变量BASEDIR;
5、用VC打开“…\DriverStudio\DriverWorks\source\VdwLibs.dsw”,用 Driver Studio进行编译,如果编译成功就OK了,然后可以进行驱动的开发了。
6、利用DriverWizard向导对所要开发的驱动类型进行正确配置,生成所需要的驱动工程框架。

安装DriverStudio3.2 过程中出现DSDDKEnv8.dll failed to register错误的解决方法 
原因:与VS2005集成时会发生此错误。
解决方法,补丁:ftp://ftp.compuware.com/pub/driverstudio/outgoing/patch/DSDDKEnv.zip
>Extract it into a temp directory. 
>Copy the file DSDDKEnv8.dll into the <INSTALL_DIR>\DriverStudio\Common\Bin directory. 
>Select "yes" if prompted to copy over an existing one. 
>Copy the file DSDDKEnv8UI.dll into the <INSTALL_DIR>\DriverStudio\Common\Bin\1033 directory. Select "yes" if prompted to copy over an existing one. 
>Then unregister the older version 
Go to start->run and type "regsvr32 -u "<INSTALL_DIR> \DriverStudio\Common\ Bin\ dsddkenv8.dll" 
注意〈INSTALL_DIR〉不能含有空格,否则命令无法执行,笔者曾将DriverStudio安装在C:\Program Files下,总是运行不了,为此郁闷了好久,后经别人提点才解决此问题,但不知其原因,请问有人知道吗?>Then register the new copy 
Go to start->run and type "regsvr32 <INSTALL_DIR>\ DriverStudio\ Common\ Bin\ dsddkenv8.dll" 
>DriverStudio menu should now be part of the VisualStudio 2005 menu

如果在vs2005+补丁后生成的解决方案文件.sln无法双击打开工程时可以使用文本编辑器打开.sln文件在第二行加入“# Visual Studio 2005”保存即可,例如:
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aa", "driver\aa.vcproj", "{6A0A9D07-FD4C-4D7C-805D-48D25FB4BE6C}"
EndProject

根治方法:
打开\DriverStudio\DriverWizard\Templates目录的WdmDriver.sln.net文件
找到“Microsoft Visual Studio Solution File, Format Version 9.00”这一行,在其后下一行加入“# Visual Studio 2005”保存即可,以后用DriverWizard生成的工程就可以正常双击打开了。

编译中可能遇到的问题(VS2005环境下)
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
这个错误,解决方法如下:
打开project->BaseClasses properties->configuration->C/C++ ->Command Line,增加/wd4430选项。
NextNode()或其他函数没有返回类型的原因,你的代码可能是从VC++里迁移到VS2005里面来编译出现的错误吧,在VC里你的函数没有返回类型他自动默认为INT,但在VS2005里就要报你上面的错误! 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
VS2015+WDK10是指在Windows 10系统下搭建驱动开发环境的组合。首先需要安装Visual Studio 2015 Enterprise,然后再安装WDK 10。注意,WDK10必须在安装VS2015之后进行安装。安装完成后,可以在VS2015的界面菜单上看到driver菜单,从而可以进行驱动开发。\[1\] 在搭建环境时,可以选择下载Community版本的VS2015,因为这个版本是免费且功能齐全的。安装包的大小大约为7G左右。安装完成后,需要选择安装Visual C++和Windows 10 SDK。\[3\] 通过搭建VS2015+WDK10的环境,可以在Windows 10系统上直接新建驱动项目并编译通过,然后在Win7及以上的系统上运行。这样可以避免自己制作模板等繁琐的步骤。\[2\] #### 引用[.reference_title] - *1* [Win10下VS2015(WDK10)驱动开发环境配置](https://blog.csdn.net/liuyez123/article/details/50857621)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [VS2015+WDK10+Win10 Win7以上系统驱动发开环境搭建](https://blog.csdn.net/wlanye/article/details/94962999)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [VS2015 + WDK10](https://blog.csdn.net/qq_25867649/article/details/54598506)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值