本文說明 USB 裝置專屬的登錄項目。
Important
本文適用於程式設計人員。 如果您是客戶遇到 USB 問題,請參閱 修正 Windows 中的 USB-C 問題
設定 USB 驅動程式堆疊行為的登錄設定
本文所述的登錄項目位於此機碼下:
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
廠商標識碼、產品標識碼和修訂編號值是從 USB裝置描述元取得。 The USB_DEVICE_DESCRIPTOR structure describes a device descriptor.
The following table describes the possible registry entries for the vvvvpppprrrr key. USB 驅動程式堆疊會將這些項目視為唯讀值。
| Registry entry | Description | Possible values |
|---|---|---|
|
osvc REG_BINARY |
指示作業系統是否查詢 Microsoft 定義的 USB 描述符的裝置。 如果先前嘗試的OS描述元查詢成功,則值會包含來自OS字串描述元的廠商程序代碼。 |
|
|
IgnoreHWSerNum REG_BINARY |
指出 USB 驅動程式堆疊是否必須忽略裝置的序號。 |
|
|
ResetOnResume REG_BINARY |
指出當埠從睡眠週期恢復時,USB 驅動程式堆疊是否必須重設裝置。 |
|
在 Windows 完成裝置列舉後查找裝置資訊
View the device interface GUID, Hardware ID, and device class information about your device
尋找公開您感興趣的裝置介面的裝置,並記下實例標識符。 例如,如果裝置介面屬於類別 {A5DCBF10-6530-11D2-901F-00C04FB951ED},您可以使用下列命令找到正確的裝置介面和裝置:
>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擷取裝置的相容標識符清單,並記下裝置類別、子類別和通訊協議代碼:
>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