01.Windows第一个驱动程序

1.驱动开发环境

  VS2013+WDK8.1

2.调试工具

  DebugView on(打印工具)

  驱动加载器

#include <ntifs.h>

/*
ntifs.h包含下面这些头文件
#include <ntddk.h>
#include <excpt.h>
#include <ntdef.h>
#include <ntnls.h>
#include <ntstatus.h>
#include <bugcodes.h>
#include <ntiologc.h>
#include <winapifamily.h>
*/

//卸载函数
VOID DriverUnload(PDRIVER_OBJECT pDriverObj)
{
	KdPrint(("DriverUnload
"));

}


//入口点
NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObj, PUNICODE_STRING pRegPath)
{

	DbgPrint(("DriverEntry 
"));
	pDriverObj->DriverUnload = DriverUnload;
	return STATUS_SUCCESS;
}
原文地址:https://www.cnblogs.com/Besttwuya/p/14018164.html