Bewerken

Delen via


USB device registry entries

This article describes USB device-specific registry entries.

Important

This topic is for programmers. If you are a customer experiencing USB problems, see Fix USB-C problems in Windows

Registry settings for configuring USB driver stack behavior

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

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

In the vvvvpppprrrr 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 USB_DEVICE_DESCRIPTOR structure describes a device descriptor.

The following table describes the possible registry entries for the vvvvpppprrrr key. The USB driver stack considers these entries to be read-only values.

Registry entry Description Possible values
osvc

REG_BINARY
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 didn't 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
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
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.

Find device information after it enumerates on Windows

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

  1. Find the device that exposes the device interface you are interested in and make note of the instance ID. For example, if the device interface belongs to class {A5DCBF10-6530-11D2-901F-00C04FB951ED} you could find the right device interface and device with the following:

    >pnputil /enum-interfaces /class {A5DCBF10-6530-11D2-901F-00C04FB951ED} /instanceid
    
    Microsoft PnP Utility
    
    Interface Path:         \\?\USB#VID_045E&PID_0840#0C33CG9212501N0#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    Interface Description:  Unknown
    Interface Class GUID:   {a5dcbf10-6530-11d2-901f-00c04fb951ed}
    Device Instance ID:     USB\VID_045E&PID_0840\0C33CG9212501N0
    Interface Status:       Enabled
    
    Interface Path:         \\?\USB#VID_045E&PID_07A5#5&109d12e&0&1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
    Interface Description:  Unknown
    Interface Class GUID:   {a5dcbf10-6530-11d2-901f-00c04fb951ed}
    Device Instance ID:     USB\VID_045E&PID_07A5\5&109d12e&0&1
    Interface Status:       Enabled
    
  2. Retrieve a list of the compatible IDs for the device and note the device class, subclass, and protocol codes:

    >pnputil /enum-devices /instanceid "USB\VID_045E&PID_0840\0C33CG9212501N0" /ids
    
    Microsoft PnP Utility
    
    Instance ID:                USB\VID_045E&PID_0840\0C33CG9212501N0
    Device Description:         USB Composite Device
    Class Name:                 USB
    Class GUID:                 {36fc9e60-c465-11cf-8056-444553540000}
    Manufacturer Name:          (Standard USB Host Controller)
    Status:                     Started
    Driver Name:                usb.inf
    Hardware IDs:               USB\VID_045E&PID_0840&REV_0215
                                USB\VID_045E&PID_0840
    Compatible IDs:             USB\COMPAT_VID_045E&DevClass_00&SubClass_00&Prot00
                                USB\COMPAT_VID_045E&DevClass_00&SubClass_00
                                USB\COMPAT_VID_045E&DevClass_00
                                USB\DevClass_00&SubClass_00&Prot_00
                                USB\DevClass_00&SubClass_00
                                USB\DevClass_00
                                USB\COMPOSITE