设备发现之初探 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 @   anyboo  阅读(715)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示