Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1572262
  • 博文数量: 596
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 173
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-06 15:50
个人简介

在线笔记

文章分类

全部博文(596)

文章存档

2016年(1)

2015年(104)

2014年(228)

2013年(226)

2012年(26)

2011年(11)

分类: Windows平台

2014-04-21 11:33:05

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请求是内核模式驱动使用的


阅读(697) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~