VS2010+WDK開發環境搭建最簡易方法


這是目前編譯驅動程序,開發驅動程序最方便、最親切、最自然的方法。

1、制作一個文本文件,(名稱如:wdkproperty.props);

1.5、在VS2010中新建空項目,配置configuration manager,添加new-debug->wdk;在project->propertis相應wdk添加新:wdkproperty.props;

2、將你制作好的wdkproperty.props放入你的project相應目錄內替換掉;

3、configuration manager選擇wdk,項目即可直接編譯成功,.sys文件出來了;

4、注意生成目錄路徑;

5、注意:我的WDK安裝在D:\DDK7600

 

wdkproperty.props

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 3   <ImportGroup Label="PropertySheets" />
 4   <PropertyGroup Label="UserMacros" />
 5   <PropertyGroup>
 6     <ExecutablePath>D:\DDK7600\bin\x86;$(ExecutablePath)</ExecutablePath>
 7   </PropertyGroup>
 8   <PropertyGroup>
 9     <IncludePath>D:\DDK7600\inc\api;D:\DDK7600\inc\ddk;D:\DDK7600\inc\crt;$(IncludePath)</IncludePath>
10   </PropertyGroup>
11   <PropertyGroup>
12     <LibraryPath>D:\DDK7600\lib\wxp\i386;$(LibraryPath)</LibraryPath>
13     <TargetExt>.sys</TargetExt>
14     <LinkIncremental>false</LinkIncremental>
15     <GenerateManifest>false</GenerateManifest>
16   </PropertyGroup>
17   <ItemDefinitionGroup>
18     <ClCompile>
19       <PreprocessorDefinitions>_X86_;DBG</PreprocessorDefinitions>
20       <CallingConvention>StdCall</CallingConvention>
21       <ExceptionHandling>false</ExceptionHandling>
22       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
23       <BufferSecurityCheck>false</BufferSecurityCheck>
24       <CompileAs>Default</CompileAs>
25       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
26       <AssemblerOutput>All</AssemblerOutput>
27     </ClCompile>
28     <Link>
29       <AdditionalDependencies>ntoskrnl.lib;wdm.lib;wdmsec.lib;wmilib.lib;ndis.lib;Hal.lib;MSVCRT.LIB;LIBCMT.LIB;%(AdditionalDependencies)</AdditionalDependencies>
30     </Link>
31     <Link>
32       <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
33       <EnableUAC>false</EnableUAC>
34       <SubSystem>Native</SubSystem>
35       <EntryPointSymbol>DriverEntry</EntryPointSymbol>
36       <BaseAddress>0x10000</BaseAddress>
37       <RandomizedBaseAddress>
38       </RandomizedBaseAddress>
39       <DataExecutionPrevention>
40       </DataExecutionPrevention>
41       <GenerateDebugInformation>true</GenerateDebugInformation>
42       <Driver>Driver</Driver>
43     </Link>
44   </ItemDefinitionGroup>
45   <ItemGroup />
46 </Project>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM