设备发现之初探 Setupapi

本文介绍Windows设备管理领域,重点讨论SetupDiXXX一族API的细节。

 

Devguid.h定义了经典设备的类GUID ,形如:GUID_DEVCLASS_Xxx

例: GUID_DEVCLASS_PRINTQUEUE

计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class

 

1) 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.

从Windows 2000 开始,驱动不在命名设备对象. 取而代之,他们使用设备接口类。设备接口类是一种导出设备和驱动功能给其它系统组件的途径,包括其它驱动和用户模式应用程序。

2) 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.

 

3) 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.

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

 

Device setup classes vs. Device interface classes vs. Windows classes

Device setup classes provide a mechanism for grouping devices that are installed and configured in the same way.

Device interface classes provide a mechanism for grouping devices according to shared characteristics.

Windows classes are defined in the system file Devguid.h.This file defines a series of GUIDs for setup classes.

 

参考资料

Overview of Device Setup Classes

Overview of Device Interface Classes

Windows Classes vs. Interface Classes

posted @ 2020-07-02 14:16  anyboo  阅读(673)  评论(0编辑  收藏  举报