驱动开发,走起!!哈哈

编写驱动windows

FirstDriver.cfile

#include<ntddk.h>
void MyDrvierUnload()
{
//
}
NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject,PUNICODE_STRING RegistryPath)
{
    DbgPrint("My First Driver!");
    pDriverObject->DriverUnload = MyDrvierUnload;
    return STATUS_SUCCESS;    
}程序

makefilemakefile

在ddk中自带的驱动程序中找到一个makefile,windows的makefile中的内容都是差很少的,因此拷贝过来便可。文件

sourcesvi

TARGETNAME = FirstDriver      //生成的驱动程序的名称
TARGETTYPE = DRIVER        //代表要生成的类型是驱动程序
SOURCES = FirstDriver.c        //想要生成pe格式文件,首先要指定源文件c
make

相关文章
相关标签/搜索