当前位置:网站首页>Introduction to WDK development 1- basic environment construction and the first driver (VS2010)
Introduction to WDK development 1- basic environment construction and the first driver (VS2010)
2022-07-24 19:35:00 【Yulong_】
1、 Install first vs2010
2、 install WDK7600
![]()


3、 stay vs2010 Create an empty project in , Name it MyDriver

4、 Click generation , Select configuration manager , Add solution configuration




5、 Switch view to property manager

Right click to add the item property sheet


Open... Under the project folder MyDriver.props file , Editing

Copy the following code to MyDriver.props in , And modify it WDK Installation path for
<?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:\install\WinDDK\7600.16385.1\bin\x86;$(ExecutablePath)</ExecutablePath>
</PropertyGroup>
<PropertyGroup>
<IncludePath>D:\install\WinDDK\7600.16385.1\inc\api;D:\install\WinDDK\7600.16385.1\inc\ddk;D:\install\WinDDK\7600.16385.1\inc\crt;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup>
<LibraryPath>D:\install\WinDDK\7600.16385.1\lib\win7\i386;$(LibraryPath)</LibraryPath>
<TargetExt>.sys</TargetExt>
<LinkIncremental>false</LinkIncremental>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>_X86_;DBG</PreprocessorDefinitions>
<CallingConvention>StdCall</CallingConvention>
<ExceptionHandling>false</ExceptionHandling>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<BufferSecurityCheck>false</BufferSecurityCheck>
<CompileAs>Default</CompileAs>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AssemblerOutput>All</AssemblerOutput>
</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>Native</SubSystem>
<EntryPointSymbol>DriverEntry</EntryPointSymbol>
<BaseAddress>0x10000</BaseAddress>
<RandomizedBaseAddress>
</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
<Driver>Driver</Driver>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>6、 Add... To the source file main.cpp file , And write the code
#include "ntddk.h"
VOID DriverUnload(PDRIVER_OBJECT driver)
{
DbgPrint("first: our driver is unloading...\r\n");
}
NTSTATUS DriverEntry(PDRIVER_OBJECT driver,PUNICODE_STRING reg_path)
{
DbgPrint("first: Hello,my salary!\r\n");
driver->DriverUnload = DriverUnload;
return STATUS_SUCCESS;
}7、 Compile and pass , Generate MyDriver.sys file

边栏推荐
- Day 10 (inheritance, rewriting and use of super)
- The ark compiler is coming. What about APK reinforcement
- Software core data protection solution
- Biopharmaceutical safety, power supply and production guarantee
- First knowledge database
- day 1
- 6.0 holes stepped by fragment request permission in the system
- Flink window & time principle
- Zooinspector Download
- 从服务器批量下载文件到本地
猜你喜欢

Look at the interface control devaxpress WinForms - how to customize auxiliary function properties (Part 2)

day 2

In the spring of domestic databases

C # shelling tool for code encryption protection

从服务器批量下载文件到本地

Flink Window&Time 原理

Meshlab&PCL ISS关键点
Cmake series tutorial 2 HelloWorld

Unity2d~ game practice of decrypting Zhou mu (completed in three days)

Summary of articles in 2020
随机推荐
思源笔记 v2.1.2 同步问题
2019 Hangzhou Electric Multi School Game 9 6684 Rikka with game [game question]
从服务器批量下载文件到本地
Look at the interface control devaxpress WinForms - how to customize auxiliary function properties (Part 2)
C # shelling tool for code encryption protection
【JVM学习04】JMM内存模型
[laser principle and application -6]:q switching element and Q drive circuit board
Software core data protection solution
Analysis and Simulation of strlen function
Arrays
Jedi survive and eat chicken F12 screenshot save path reference
Equals() method of object class
Leetcode652 finding duplicate subtrees
文献阅读:GoPose 3D Human Pose Estimation Using WiFi
[JVM learning 04] JMM memory model
Detailed explanation of the relationship between MySQL tables
Basic idea of regularization
Summary of articles in 2020
[face to face experience of school recruitment] 8 real questions of pointer interview. Come and test how many you have mastered.
MySQL final chapter