日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

VS2005+WDK+DriverStudio

發(fā)布時間:2023/12/14 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 VS2005+WDK+DriverStudio 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
配置一個好的開發(fā)環(huán)境是學習驅(qū)動開發(fā)的第一步,我在這里介紹一下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補丁,一定按照提示安裝注冊否則出現(xiàn)錯誤提示(在一個頭文件中出現(xiàn)錯誤,位置處有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: 關(guān)于Driver?Studio?3.2?的安裝詳解
經(jīng)過對VC、WINDDK、Driver?Studio這三個軟件反復的安裝,終于可以使Driver?Studio能在VC環(huán)境下正常編譯了。俗話說久病成醫(yī),遇到的問題多了,自然就有了很多解決問題的方法,現(xiàn)在拿出來和大家一起分享一下。
1、分別安裝VC、WINDDK、Driver?Studio,為:VC-〉WINDDK-〉?Driver?Studio。其實順序也可以變一下的,筆者曾試過VC-〉?Driver?Studio?-〉WINDDK,沒問題的,但最好按建議順序安裝;
2、注意安裝DDK時,建議將例子等全部安裝,否則Driver?Studio編譯時會提示缺少頭文件;
3、在VS2005環(huán)境下,安裝Driver?Studio時會有對話框彈出,單擊Ignore按鈕,解決辦法會在后面詳細說明;
4、選擇“DriverStudio->DDK?Build?Setting”,在“DDK?Root?Directory”選項中選入DDK目錄,例如“C:\WINDDK\2600”。為了防止每次啟動VC來編譯WDM時,都要設(shè)置DDK目錄,可以在“控制面板”的“系統(tǒng)”-〉“高級”-〉“環(huán)境變量E”設(shè)置中,添加一個值為C:\WINDDK\2600的系統(tǒng)變量BASEDIR;
5、用VC打開“…\DriverStudio\DriverWorks\source\VdwLibs.dsw”,用?Driver?Studio進行編譯,如果編譯成功就OK了,然后可以進行驅(qū)動的開發(fā)了。
6、利用DriverWizard向?qū)λ_發(fā)的驅(qū)動類型進行正確配置,生成所需要的驅(qū)動工程框架。

安裝DriverStudio3.2?過程中出現(xiàn)DSDDKEnv8.dll?failed?to?register錯誤的解決方法?
原因:與VS2005集成時會發(fā)生此錯誤。
解決方法,補丁: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〉不能含有空格,否則命令無法執(zhí)行,筆者曾將DriverStudio安裝在C:\Program?Files下,總是運行不了,為此郁悶了好久,后經(jīng)別人提點才解決此問題,但不知其原因,請問有人知道嗎?>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環(huán)境下)
error?C4430:?missing?type?specifier?-?int?assumed.?Note:?C++?does?not?support?default-int
這個錯誤,解決方法如下:
打開project->BaseClasses?properties->configuration->C/C++?->Command?Line,增加/wd4430選項。
NextNode()或其他函數(shù)沒有返回類型的原因,你的代碼可能是從VC++里遷移到VS2005里面來編譯出現(xiàn)的錯誤吧,在VC里你的函數(shù)沒有返回類型他自動默認為INT,但在VS2005里就要報你上面的錯誤!?

總結(jié)

以上是生活随笔為你收集整理的VS2005+WDK+DriverStudio的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。