One: Software
1. Download VS2010
2. Download WDK7.1.0
http://www.microsoft.com/en-us/download/confirmation.aspx?id=11800
Two: Installation precautions
1. Be sure to put the WDK in VS2010 the same level directory, or install failure, blood and tears lessons!
2.WDK follow the default options to install.
Three: Environment configuration
1. Refer to Xiaoguozi ' S Blog:
Http://www.cppblog.com/guojingjia2006/archive/2011/03/19/142211.html
Four: Testing
1. Common Problem Solving methods:
1> failed to load the. dll
Workaround:
Http://blog.chinaunix.net/uid-11765716-id-3074932.html
#include "Ntddk.h"
NTSTATUS
DriverEntry (Pdriver_object driverobject,punicode_string Registrypath)
{
return status_unsuccessful;
}
1>------Started Build: Project: Userdriver, configuration: Driver Win32------
1> build Start time is 2017-1-10 10:01:09.
1>initializebuildstatus:
1> is creating "Driver\userdriver.unsuccessfulbuild" because "AlwaysCreate" is already specified.
1>clcompile:
1> UserDriver.cpp
1>link:
1> Userdriver.vcxproj-C:\Users\Cola\Desktop\User_Driver\UserDriver\driver\UserDriver.sys
1>finalizebuildstatus:
1> is deleting the file "Driver\userdriver.unsuccessfulbuild".
1> is performing a Touch task on "Driver\userdriver.lastbuildstate".
1>
1> generated successfully.
1>
1> used Time 00:00:05.71
========== Generation: Success 1, failure 0, latest 0, skip 0 ==========
VS2010 WDK7.1.0 win7_64