USB Device Registry Entries

7 篇文章 0 订阅

Find device information after it enumerates on Windows

View the device interface GUID, Hardware Id, and device class information about your device

  1. Find this registry key and note the DeviceInstance value:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\

    usb hardware id

  2. Find the device instance registry key and get the device interface GUID:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\<hardware id>\<instance id>\Device Parameters

    usb device interface guid

  3. Under the device instance key, note the device class, subclass, and protocol codes:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB

    usb device class subclass protocol codes

Registry settings for configuring USB driver stack behavior

The registry entries described in this topic are found under this key:

C++Copy

HKEY_LOCAL_MACHINE
   SYSTEM
      CurrentControlSet
         Control
            usbflags
               <VVVVPPPPRRRR>
                  <Device-specific registry entry>

In the vvvvpppprrrrr key,

  • vvvv is a 4-digit hexadecimal number that identifies the vendor
  • pppp is a 4-digit hexadecimal number that identifies the product
  • rrrr is a 4-digit hexadecimal number that contains the revision number of the device.

The vendor ID, product ID, and revision number values are obtained from the USB device descriptor. The following table describes the possible registry entries for the vvvvpppprrrrr key. The USB driver stack considers these entries as read-only values.

TABLE 1
Registry entryDescriptionPossible values

osvc

REG_BINARY

Supported on Windows XP and later versions.

Indicates whether the operating system queried the device for Microsoft-Defined USB Descriptors. If the previously-attempted OS descriptor query was successful, the value contains the vendor code from the OS string descriptor.

  • 0x0000: The device did not provide a valid response to the Microsoft OS string descriptor request.

  • 0x01xx: The device provided a valid response to the Microsoft OS string descriptor request, where xx is the bVendorCode contained in the response.

IgnoreHWSerNum

REG_BINARY

Supported on Windows Vista and later versions.

Indicates whether the USB driver stack must ignore the serial number of the device.

  • 0x00: The setting is disabled.

  • 0x01: Forces the USB driver stack to ignore the serial number of the device. Therefore, the device instance is tied to the port to which the device is attached.

ResetOnResume

REG_BINARY

Supported on Windows Vista and later versions.

Indicates whether the USB driver stack must reset the device when the port resumes from a sleep cycle.

  • 0x0000: The setting is disabled.

  • 0x0001: Forces the USB driver stack to reset a device on port resume.

 

 

https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-device-specific-registry-settings

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值