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\r\n"));

}


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

	DbgPrint(("DriverEntry \r\n"));
	pDriverObj->DriverUnload = DriverUnload;
	return STATUS_SUCCESS;
}
posted @ 2020-11-22 04:04  Besttwuya  阅读(166)  评论(0编辑  收藏  举报