KMDF规则  MDSN

Kernel-Mode Driver Framework (KMDF) provides object-based interfaces for drivers. Framework-defined object interfaces consist of:

 

Object methods

Methods are functions that a driver can call to perform an operation on the object or to get or set an object property. Methods are named WdfObjectAction, where Object describes the object and Action indicates what the function does. For example, WdfDeviceCreate creates a device object.

Object event callback functions

Event callback functions are functions that a driver provides. Each event callback function is associated with a specific event that can occur on an object. The framework calls the event callback function when the associated event occurs. By convention, the placeholders for event callback functions are called EvtObjectEvent, although you can name these callbacks anything you choose in your driver. For example, a driver registers the EvtDeviceD0Entryevent callback to be notified when its device enters the working state.

Object properties

Properties are values that are stored within an object and that a driver can get (that is, obtain) and set (that is, change). In many cases, properties map directly to the fields in the corresponding WDM objects. Properties that cannot fail are named WdfObjectGetValue and WdfObjectSetValue, and properties that can fail are namedWdfObjectRetrieveValue and WdfObjectAssignValueObject describes the object, and Value identifies the data that the function sets or returns. For example, WdfDeviceGetDriver returns a handle to the driver object that is associated with the device object.

Object handles

A framework-based driver never directly accesses framework objects. Instead, the driver receives object handles, which it can pass to an object's methods.

The framework defines several object types that framework-based drivers use:

  • framework driver object represents each driver.

  • framework device object represents each device that a driver supports.

  • Framework queue objects represent I/O queues that receive a device's I/O requests.

  • Framework request objects represent I/O requests that each I/O queue receives.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值