一直习惯VS2010开发环境,之前配过一次vs2010的驱动开发环境,重装系统后,又要重新配置,找了好几篇文章,配置都没成功,突然相到之前配置过成功过,直接将原来驱动程序的配置文件拿过来使用就可以了。
当然首先: 打开(生成-->配置管理器) 并新建一个名称为"Dirver"的解决方案配置 从此处复制设置:debug.
此时会在工程目录下成成一个配置文件。 将下面内容复制到配置文件中,关闭工程重新打开即可。
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ImportGroup Label="PropertySheets" /> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <ExecutablePath>D:\WinDDK\7600.16385.1\bin\x86;$(ExecutablePath)</ExecutablePath> </PropertyGroup> <PropertyGroup> <IncludePath>D:\WinDDK\7600.16385.1\inc\api;D:\WinDDK\7600.16385.1\inc\ddk;D:\WinDDK\7600.16385.1\inc\crt;$(IncludePath)</IncludePath> </PropertyGroup> <PropertyGroup> <LibraryPath>D:\WinDDK\7600.16385.1\lib\win7\i386;$(LibraryPath)</LibraryPath> <TargetExt>.sys</TargetExt> <LinkIncremental>false</LinkIncremental> </PropertyGroup> <ItemDefinitionGroup> <ClCompile> <PreprocessorDefinitions>_X86_;DBG</PreprocessorDefinitions> <CallingConvention>StdCall</CallingConvention> </ClCompile> <Link> <AdditionalDependencies>ntoskrnl.lib;wdm.lib;wdmsec.lib;wmilib.lib;ndis.lib;Hal.lib;MSVCRT.LIB;LIBCMT.LIB;%(AdditionalDependencies)</AdditionalDependencies> </Link> <Link> <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries> <EnableUAC>false</EnableUAC> <SubSystem>Console</SubSystem> <EntryPointSymbol>DriverEntry</EntryPointSymbol> <BaseAddress>0x10000</BaseAddress> <RandomizedBaseAddress> </RandomizedBaseAddress> <DataExecutionPrevention> </DataExecutionPrevention> <GenerateDebugInformation>true</GenerateDebugInformation> </Link> </ItemDefinitionGroup> <ItemGroup /> </Project>
PS:需要注意的是,配置文件中D:\WinDDK 目录需要改成自己磁盘该文件的目录
Vs2010 配置驱动开发环境,布布扣,bubuko.com
时间: 2024-12-23 10:12:23