简体   繁体   English

Windows设备属性文档?

[英]Windows Device properties documentation?

in windows if you go DeviceManager -> Select Device(Like aa keyboard) -> Go to details -> List of properties: 在Windows中,如果您转到DeviceManager->选择设备(如aa键盘)->转到详细信息->属性列表:

Device description
Hardware Ids
Compatible Ids
Device class
Device class guid
Driver key
ConfigFlags
... etc

Where can I find what each of these properties mean? 我在哪里可以找到这些属性的含义?

From MSDN documentation , you will find description for Device Instance IDs, and link to other descriptions. MSDN文档中 ,您将找到设备实例ID的描述,并链接到其他描述。 This link briefly describes some of them, which are listed as following: 该链接简要描述了其中的一些,列出如下:

Device IDs 设备ID

A device ID is a vendor-defined identification string that is the most specific ID that Setup uses to match a device to an INF file. 设备ID是供应商定义的标识字符串,它是安装程序用来将设备与INF文件进行匹配的最特定的ID。 A device has only one device ID. 一台设备只有一个设备ID。 A device ID has the same format as a hardware ID. 设备ID与硬件ID的格式相同。 If an enumerator reports a list of hardware IDs for a device, the device ID should be the first hardware ID in the list. 如果枚举器报告设备的硬件ID列表,则该设备ID应该是列表中的第一个硬件ID。

The PnP Manager uses the device ID to create a subkey for a device under the registry key for the device's enumerator. PnP管理器使用设备ID在设备枚举器的注册表项下创建设备的子项。

To obtain a device ID, use an IRP_MN_QUERY_ID request and set the Parameters.QueryId.IdType field to BusQueryDeviceID. 要获取设备ID,请使用IRP_MN_QUERY_ID请求,并将Parameters.QueryId.IdType字段设置为BusQueryDeviceID。

Hardware IDs 硬件ID

A hardware ID is a vendor-defined identification string that Setup uses to match a device to an INF file. 硬件ID是供应商定义的标识字符串,安装程序将其用于将设备与INF文件进行匹配。 In most cases, a device has associated with it a list of hardware IDs. 在大多数情况下,设备已将其与硬件ID列表相关联。 (However, there are exceptions – see Identifiers for 1394 Devices). (但是,也有例外–请参阅1394设备的标识符)。 The first hardware ID in the list should be the device ID, and the remaining IDs should be listed in order of decreasing suitability. 列表中的第一个硬件ID应该是设备ID,其余的ID则应按照适用性降低的顺序列出。

A hardware ID has one of the following generic formats: 硬件ID具有以下通用格式之一:

<enumerator>\\<enumerator-specific-device-ID> This is the most common format for individual PnP devices reported to the PnP Manager by a single enumerator. <enumerator>\\<enumerator-specific-device-ID>这是单个枚举器报告给PnP Manager的单个PnP设备的最常见格式。 New enumerators should use this format or the following format. 新的枚举数应使用此格式或以下格式。 *<enumerator-specific-ID> The asterisk indicates that the device is supported by more than one enumerator, such as ISAPNP and the BIOS. *<enumerator-specific-ID>星号表示该设备受多个枚举器(例如ISAPNP和BIOS)支持。 <device-class-specific-ID> An existing device class that has established its own naming convention might use a custom format. <device-class-specific-ID>已建立自己的命名约定的现有设备类可能会使用自定义格式。 For information on their hardware ID formats, see the hardware specification for such buses. 有关其硬件ID格式的信息,请参见此类总线的硬件规范。 New enumerators should not use this format. 新的枚举数不应使用此格式。 The number of characters of a hardware ID, excluding a NULL-terminator, must be less than MAX_LENGTH_LEN. 硬件ID的字符数(不包括NULL终止符)必须少于MAX_LENGTH_LEN。 This constraint applies to the sum of the lengths of all the fields and any “\\” field separators in a hardware ID. 此约束适用于硬件ID中所有字段和任何“ \\”字段分隔符的长度之和。 In addition, when an instance ID is concatenated to a hardware ID to create a device instance ID, the lengths of the hardware ID and the instance ID are further constrained by the maximum possible length of a device instance ID. 另外,当将实例ID连接到硬件ID以创建设备实例ID时,硬件ID和实例ID的长度进一步受到设备实例ID的最大可能长度的约束。

To obtain the list of hardware IDs for a device, call IoGetDeviceProperty with the DeviceProperty parameter set to DevicePropertyHardwareID. 要获取设备的硬件ID列表,请调用IoGetDeviceProperty,并将DeviceProperty参数设置为DevicePropertyHardwareID。 The list of hardware IDs that this routine retrieves is a REG_MULTI_SZ value. 该例程检索的硬件ID列表是REG_MULTI_SZ值。 The maximum number of characters in a hardware list, including a NULL terminator after each hardware ID and a final NULL terminator, is REGSTR_VAL_MAX_HCID_LEN. 硬件列表中的最大字符数为REGSTR_VAL_MAX_HCID_LEN,包括每个硬件ID后的NULL终止符和最终的NULL终止符。 The maximum possible number of IDs in a list of hardware IDs is MAX_HCID_COUNT. 硬件ID列表中ID的最大数量为MAX_HCID_COUNT。

Examples of Hardware IDs 硬件ID的示例

In the following, the first example is a generic identifier for a PnP device, and the second example is an identifier for a PCI device: 下面,第一个示例是PnP设备的通用标识符,第二个示例是PCI设备的标识符:

root*PNP0F08 根* PNP0F08

PCI\\VEN_1000&DEV_0001&SUBSYS_00000000&REV_02 PCI \\ VEN_1000&DEV_0001&SUBSYS_00000000&REV_02

Compatible IDs 兼容的ID

A compatible ID is a vendor-defined identification string that Setup uses to match a device to an INF file. 兼容ID是安装程序用来将设备与INF文件进行匹配的供应商定义的标识字符串。 A device can have associated with it a list of compatible IDs. 设备可以与兼容ID列表关联。 The compatible IDs should be listed in order of decreasing suitability. 兼容ID应按适用性降低的顺序列出。 If Setup cannot locate an INF file that matches one of a device's hardware IDs, it uses compatible IDs to locate an INF file. 如果安装程序无法找到与设备的硬件ID之一匹配的INF文件,则它将使用兼容的ID来查找INF文件。 Compatible IDs have the same format as hardware IDs; 兼容的ID与硬件ID的格式相同; however, compatible IDs are typically more generic than hardware IDs. 但是,兼容的ID通常比硬件ID更通用。

If a vendor ships an INF file that specifies a compatible ID for a driver node, the vendor should ensure that their INF file can support all the hardware that matches the compatible ID. 如果供应商提供了为驱动程序节点指定兼容ID的INF文件,则供应商应确保其INF文件可以支持所有与兼容ID匹配的硬件。 Because a match with a compatible ID is not as strong as a match to a hardware ID, the PnP Manager prompts the user for confirmation before processing the INF file. 由于具有兼容ID的匹配不如与硬件ID的匹配强,因此PnP管理器会在处理INF文件之前提示用户进行确认。

To obtain a list of compatible IDs for a device, call IoGetDeviceProperty with the DeviceProperty parameter set to DevicePropertyCompatibleID. 要获取设备的兼容ID列表,请调用IoGetDeviceProperty,并将DeviceProperty参数设置为DevicePropertyCompatibleID。 The list of compatible IDs that this routine retrieves is a REG_MULTI_SZ value. 该例程检索的兼容ID的列表是REG_MULTI_SZ值。 The maximum number of characters in a compatible ID list, including a NULL terminator after each compatible ID and a final NULL terminator, is REGSTR_VAL_MAX_HCID_LEN. 兼容ID列表中的最大字符数为REGSTR_VAL_MAX_HCID_LEN,包括每个兼容ID后的NULL终止符和最后的NULL终止符。 The maximum possible number of IDs in a list of compatible IDs is MAX_HCID_COUNT. 兼容ID列表中ID的最大数量为MAX_HCID_COUNT。

Instance IDs 实例ID

An instance ID is a device identification string that distinguishes a device from other devices of the same type on a machine. 实例ID是设备标识字符串,用于将设备与计算机上相同类型的其他设备区分开。 An instance ID contains serial number information, if supported by the underlying bus, or some kind of location information. 如果基础总线支持,则实例ID包含序列号信息或某种位置信息。 The string cannot contain any "\\" characters; 该字符串不能包含任何“ \\”字符; otherwise, the generic format of the string is bus-specific. 否则,字符串的通用格式是特定于总线的。

The number of characters of an instance ID, excluding a NULL-terminator, must be less than MAX_LENGTH_LEN. 实例ID的字符数(不包括NULL终止符)必须少于MAX_LENGTH_LEN。 In addition, when an instance ID is concatenated to a device ID to create a device instance ID, the lengths of the device ID and the instance ID are further constrained by the maximum possible length of a device instance ID. 另外,当将实例ID与设备ID连接以创建设备实例ID时,设备ID和实例ID的长度进一步受到设备实例ID的最大可能长度的约束。

The UniqueID member of the DEVICE_CAPABILITIES structure for a device indicates if a bus-supplied instance ID is unique across the system, as follows: 设备的DEVICE_CAPABILITIES结构的UniqueID成员指示总线提供的实例ID在整个系统中是否唯一,如下所示:

If UniqueID is FALSE, the bus-supplied instance ID for a device is unique only to the device's bus. 如果UniqueID为FALSE,则设备的总线提供的实例ID仅对设备的总线唯一。 The PnP Manager modifies the bus-supplied instance ID, and combines it with the corresponding device ID, to create a device instance ID that is unique in the system. PnP管理器修改总线提供的实例ID,并将其与相应的设备ID组合在一起,以创建系统中唯一的设备实例ID。 If UniqueID is TRUE, the device instance ID, formed from the bus-supplied device ID and instance ID, uniquely identifies a device in the system. 如果UniqueID为TRUE,则由总线提供的设备ID和实例ID组成的设备实例ID将唯一标识系统中的设备。 An instance ID is persistent across system boots. 实例ID在系统引导期间是持久的。

To obtain the bus-supplied instance ID for a device, use an IRP_MN_QUERY_ID request and set the Parameters.QueryId.IdType member to BusQueryInstanceID. 要获取设备的总线提供的实例ID,请使用IRP_MN_QUERY_ID请求,并将Parameters.QueryId.IdType成员设置为BusQueryInstanceID。

Device Instance IDs 设备实例ID

A device instance ID is a system-supplied device identification string that uniquely identifies a device in the system. 设备实例ID是系统提供的设备标识字符串,用于唯一标识系统中的设备。 The PnP Manager assigns a device instance ID to each device node in a system's device tree. PnP管理器将设备实例ID分配给系统设备树中的每个设备节点。

The format of this string consists of an instance ID concatenated to a device ID, as follows: 该字符串的格式由一个实例ID和一个设备ID组成,如下所示:

\\ The number of characters of a device instance ID, excluding a NULL-terminator, must be less than MAX_LENGTH_LEN. \\设备实例ID的字符数(不包括NULL终止符)必须少于MAX_LENGTH_LEN。 This constraint applies to the sum of the lengths of all the fields and “\\” field separator between the device ID and instance-specific-ID fields. 此约束适用于所有字段长度的总和以及设备ID和实例特定ID字段之间的“ \\”字段分隔符。 A device instance ID is persistent across system boots. 设备实例ID在系统引导期间是持久的。

The following is an example of an instance ID ("1&08") concatenated to a device ID for a PCI device: 以下是实例ID(“ 1&08”)与PCI设备的设备ID串联的示例:

PCI\\VEN_1000&DEV_0001&SUBSYS_00000000&REV_02\\1&08 PCI \\ VEN_1000&DEV_0001&SUBSYS_00000000&REV_02 \\ 1&08

Most of it is exposed via the "Setup API". 大部分通过“设置API”公开。 Some data may be driver-specific, in which case you'd have to ask the driver writer. 一些数据可能是特定于驱动程序的,在这种情况下,您必须询问驱动程序编写者。 The ones you've listed are all standard Microsoft properties. 您列出的都是Microsoft的标准属性。 Eg the "device class" describes what type of device it is, eg. 例如,“设备类别”描述了它是什么类型的设备。 mouse/keyboard/storage/videocard/audio/... 鼠标/键盘/存储/视频卡/音频/ ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM