设备标识字符串(Device Identification Strings)

The Plug and Play (PnP) manager and Setup use device identification strings to identify devices that are installed in a computer.

Setup uses the following device identification strings to locate the information (INF) file that best matches the device. These strings are reported by a device's enumerator:

Pnp管理器和安装程序是通过设备标识字符串来将匹配安装一个设备到电脑中的。安装程序通过下面的设备标识字符串来找到和这个设备匹配的inf文件:

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. A device has only one device ID. A device ID has the same format as a hardware ID. When an enumerator reports a list of hardware IDs for a device, the device ID should be the first hardware ID in the list.

The Plug and Play (PnP) manager uses the device ID to create a subkey for a device under the registry key for the device's enumerator.

To obtain a device ID, use an IRP_MN_QUERY_ID request and set the Parameters.QueryId.IdType field to BusQueryDeviceID.

设备ID是大多数厂商都会指定的ID以便安装程序用来找到与设备相匹配的inf文件。一个设备只能有一个设备ID。设备ID有着和硬件ID一样的格式。在枚举器上报一个设备的硬件ID列表时,设备ID必将是列表中的第一个硬件ID。

Pnp管理器通过设备ID在注册表的此设备枚举器键下面为此设备创建一个子键。

设置Parameters.QueryId.IdType 的值为BusQueryDeviceID然后发送IRP_MN_QUERY_ID给相应的设备,便可以获得到该设备的设备ID。

Hardware IDs (硬件ID)

A hardware ID is a vendor-defined identification string that Setup uses to match a device to an INF file. In most cases, a device has associated with it a list of hardware IDs. (However, there are exceptions − see Identifiers for 1394 Devices). When an enumerator reports a list of hardware IDs for a device, the first hardware ID in the list should be the device ID, and the remaining hardware IDs should be listed in order of decreasing suitability.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

danxuezx

如果对你有用是我的快乐

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

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

打赏作者

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

抵扣说明:

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

余额充值