驱动对象(DRIVER_OBJECT)

DRIVER_OBJECT是每个Windows驱动程序的核心组成部分,由内核在驱动加载时创建。作为驱动实例,它由I/O管理器加载并仅加载一次。驱动程序必须在DriverEntry中对其进行初始化。
摘要由CSDN通过智能技术生成

每个驱动程序会有唯一的DRIVER_OBJECT驱动对象与之对应,并且这个DRIVER_OBJECT是在驱动加载时候,被内核中的对象管理器所创建。它作为驱动一个实例被内核加载,并且内核对一个驱动只加载一个实例。确切的说,是由内核的I/O管理器负责加载的。驱动程序需要在DriveEntry中初始化。

typedef struct _DRIVER_OBJECT {
    CSHORT Type;
    CSHORT Size;

    //
    // The following links all of the devices created by a single driver
    // together on a list, and the Flags word provides an extensible flag
    //location for driver objects.
    
	
    PDEVICE_OBJECT DeviceObject;//the first pointer Of links
	
	
    ULONG Flags;

    //
    // The following section describes where the driver is loaded.  The count
    // field is used to count the number of times the driver has had its
   // registered reinitialization routine invoked.
    //

    PVOID DriverStart;
    ULONG DriverSize;
    PVOID DriverSection;
    PDRIVER_EXTENSION DriverExtension;

    //
    // The driver name field 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值