VS2005+WDK+DriverStudio
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里就要報你上面的錯誤!?
總結
以上是生活随笔為你收集整理的VS2005+WDK+DriverStudio的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2021 9.14 p.m.小结 以及
- 下一篇: 关于VMWare版本下载选择