Windows驱动开发(二)

  •     本节主要介绍驱动开发的一些基础知识。


    1. 驱动程序的基本组成

        1.1. 最经常见到的数据结构

               a. DRIVER_OBJECT驱动对象

[cpp]  view plain copy
  1. // WDK中对驱动对象的定义  
  2. // 每个驱动程序都会有一个唯一的驱动对象与之对应  
  3. // 它是在驱动加载时被内核对象管理程序创建的  
  4.   
  5. typedef struct _DRIVER_OBJECT {  
  6.     CSHORT Type;  
  7.     CSHORT Size;  
  8.   
  9.     //  
  10.     // The following links all of the devices created by a single driver  
  11.     // together on a list, and the Flags word provides an extensible flag  
  12.     // location for driver objects.  
  13.     //  
  14.   
  15.     PDEVICE_OBJECT DeviceObject;  
  16.     ULONG Flags;  
  17.   
  18.     //  
  19.     // The following section describes where the driver is loaded.  The count  
  20.     // field is used to count the number of times the driver has had its  
  21.     // registered reinitialization routine invoked.  
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值