1. Setup Visual Studio 2008
2. Setup DDK (WDK)
3. Add to VS pathes to DDK include files, libs and bins.
4. Create new empty "Win32 project" and add source file (i.e. HelloWorld.c).
5. Configure project properties (All Configurations)
5.1. C\C++ - General - Debug Information Format = Program Database (/Zi)
5.2. C\C++ - Preprocessor - Preprocessor Definitions = _X86_ [add also DBG for Debug config]
5.3. C\C++ - Code Generation - Enable C++ Exceptions = No
5.4. C\C++ - Code Generation - Basic Runtime Checks = Default
5.5. C\C++ - Code Generation - Buffer Security Check = No (/GS-)
5.6. C\C++ - Advanced - Calling Convention = __stdcall (/Gz)
5.7. C\C++ - Advanced - Compile As = Compile as C Code (/TC) [if you are going to use plain C]
5.8. Linker - General - Output File = $(OutDir)\$(ProjectName).sys
5.9. Linker - General - Enable Incremental Linking = Default
5.10. Linker - Input - Additional Dependencies = ntoskrnl.lib hal.lib $(NOINHERIT) [add here needed libs here e.g. ntoskrnl.lib hal.lib]
5.11. Linker - Input - Ignore All Default Libraries = Yes (/NODEFAULTLIB)
5.12. Linker - Manifest File - Generate Manifest = No
5.13. Linker - System - SubSystem = Native (/SUBSYSTEM:NATIVE)
5.14. Linker - System - Driver = Driver (/DRIVER)
5.15. Linker - Advanced - Entry Point = DriverEntry
5.16. Linker - Advanced - Base Address = 0x10000
5.17. Linker - Advanced - Randomized Base Address = Disable (/DYNAMICBASE:NO)
5.18. Linker - Advanced - Data Execution Prevention(DEP) = Disable (/NXCOMPAT:NO)
6. OK. Have done. Now you can test it with simple code, e.g.:
#include "ntddk.h"
NTSTATUS
DriverEntry(PDRIVER_OBJECT DriverObject,PUNICODE_STRING RegistryPath)
{
return STATUS_UNSUCCESSFUL;
source url: http://www.codeproject.com/KB/winsdk/vs2008_and_drivers.aspx
分享到:
相关推荐
with the Visual C++ development envi- ronment by building a simple application. DAY 2 Learn about the stan- dard controls used in Windows applica- tions, how you can place and configure them on an ...
6.8.1 Packet Tracer - Configure NAT for IPv4 Cisco Packet Tracer 思科模拟器 正确答案文件 可直接上交正确答案文件 本答案版权归mewhaku所有,严禁再次转载!!! Copyright @mewhaku 2022 All Rights ...
how to configure kernelhow to configure kernel
Networkers2009:BRKNMS-2004 - 13 Smart Ways To Configure your Cisco IOS Network Elements
How to Configure User Status in mySAP SRM.pdf
vmware-vsphere-install-configure-manage-v70
用于 Visual Studio 的 SQLCipher,构建平台 x32 和 x64 是 Visual Studio 2013 的开源库 [ ] 的一个简单端口。一切都应该开箱即用,以编译 x32 和 x64 版本的 sqlcipher。 版本 sqlcipher-visual-studio是 并已...
openCV4.6.0+android-ndk-r22-windows-x86_64编译的arm64-v8a动、静态库 ...CSDN审核可能较慢,如无法下载,可以过段时间再回来看下 仅供相关爱好者交流使用,请于下载24小时内删除
2.7.2-packet-tracer---configure-single-area-ospfv2---physical-mode_zh-CN.pka
This article introduces how to configure ODBC DSN in Server to access local DB2 for windows in detail. Then I give a sample how to access local DB2 database with ODBC by DB Query Analyzer expediently.
This article introduces how to configure ODBC DSN in Client to access remote DB2 for windows in detail. Then I give a sample how to access remote DB2 database with ODBC by DB Query Analyzer ...
树莓派-rxtx2.1.7r2-configure
DataGrid-ASP.NET MVC-如何基于... 将Controller,LoadAction,UpdateAction,InsertAction和DeleteAction选项设置为true,以便dxDataGrid的数据源可以访问控制器中的相应动作。 . DataSource ( d => d .... .... .... .... .... ....
The book starts by familiarizing you with the main features of Visual Studio and how to configure the user interface depending on your needs. You'll then dive into each key developer tool in turn, ...
How to Configure NLB MP in mix and native mode
How to configure OneFS to allow NFS mounts from unprivileged ports
hands-on guide that provides a number of clear, step-by-step exercises, which will help you to take advantage of the new features and real power of Visual Studio 2012. Software Testing Using Visual ...
4.2.7 Packet Tracer - Configure Router-on-a-Stick Inter-VLAN Routing Cisco Packet Tracer 思科模拟器 正确答案文件 可直接上交正确答案文件 本答案版权归mewhaku所有,严禁再次转载!!! Copyright @...
Linux-Kernel_2.6(configure)[参照].pdf
This manual, Integrated Virtual Debugger for Visual Studio Developer’s Guide, provides information about how to install, configure, and use the Integrated Virtual Debugger for Visual Studio. This ...