Device Interface Classes WDM

ms-help://MS.WDK.v10.7600.091201/DevInst_d/hh/DevInst_d/setup-cls_701b0efb-d581-4b55-84cc-a46816dddee4.xml.htm

  1. Device interface classes are the means by which drivers make devices available to applications and other drivers.
  2. (驱动接口类指驱动让应用程序或其他驱动对其可见)

  3. This section contains the following topics:

  4. Introduction to Device Interfaces

  5. Registering a Device Interface Class

  6. Enabling and Disabling a Device Interface Instance

  7. Using a Device Interface

  8. For information about the system-defined device interface classes, see System-Defined Device Interface Classes.

  1. Introduction to Device Interfaces
  2. Any driver of a physical, logical, or virtual device to which user-mode code can direct I/O requests must supply some sort of name for its user-mode clients. Using the name, a user-mode application (or other system component) identifies the device from which it is requesting I/O.

  3. In Windows NT 4.0 and earlier versions of the NT-based operating system, drivers named their device objects and then set up symbolic links in the registry between these names and a user-visible Win32 logical name.
  4. (在NT4.0以前的版本,驱动命名自己的设备对象并建立符号链接在设备名和用户可见的Win32逻辑名。)

  5. Starting with Windows 2000, drivers do not name device objects. Instead, they make use of device interface classes. A device interface class is a way of exporting device and driver functionality to other system components, including other drivers, as well as user-mode applications. A driver can register a device interface class, then enable an instance of the class for each device object to which user-mode I/O requests might be sent.
  6. (Windows2000以后,驱动不需要命名设备对象。取而代之的是使用设备接口类。)

  7. Each device interface class is associated with a GUID. The system defines GUIDs for common device interface classes in device-specific header files. Vendors can create additional device interface classes.

  8. For example, three different types of mouse devices could be members of the same device interface class, even if one connects through a USB port, a second through a serial port, and the third through an infrared port. Each driver registers its device as a member of the interface class GUID_DEVINTERFACE_MOUSE. This GUID is defined in the header file Ntddmou.h.

  9. Typically, drivers register for only one interface class. However, drivers for devices that have specialized functionality beyond that defined for their standard interface class might also register for an additional class. For example, a driver for a disk that can be mounted should register for both its disk interface class (GUID_DEVINTERFACE_DISK) and the mountable device class (MOUNTDEV_MOUNTED_DEVICE_GUID).

  10. When a driver registers an instance of a device interface class, the I/O manager associates the device and the device interface class GUID with a symbolic link name. The link name is stored in the registry and persists across system starts. An application that uses the interface can query for instances of the interface and receive a symbolic link name representing a device that supports the interface. The application can then use the symbolic link name as a target for I/O requests.

  11. Do not confuse device interfaces with the interfaces that drivers can export in response to an IRP_MN_QUERY_INTERFACE request. That IRP is used to pass routine entry points between kernel-mode drivers.
  12. IRP_MN_QUERY_INTERFACE 这个IRP请求是内核模式驱动使用的


<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(175) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kelsel

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值