http://community.silabs.com/t5/Interface-Knowledge-Base/Windows-USB-Device-Path/ta-p/114059

Windows operating systems rely on a unique device path to uniquely identify each USB device/interface connected to the system. A device path string is used to communicate with a USB device and is passed to the CreateFile() Win32 API function.

USB Device Path Format

In most cases, Windows formats the USB device path as follows:

\?usb#vid_vvvv&pid_pppp#ssss#{gggggggg-gggg-gggg-gggg-gggggggggggg}

Where:
vvvv is the USB vendor ID represented in 4 hexadecimal characters.
pppp is the USB product ID represented in 4 hexadecimal characters.
ssss is the USB serial string represented in n characters.
gggggggg-gggg-gggg-gggg-gggggggggggg is the device interface GUID that is used to link applications to device with specific drivers loaded.

The CP210x VCP driver GUID is:

{A2A39220-39F4-4b88-AECB-3D86A35DC748}

The GUID is assigned in the driver or driver INF file and is used by the application to filter devices that have loaded that driver.

Composite USB Device Path Format For Interfaces

For a composite device with multiple interfaces, the device path for each interface might look something like:

\?usb#vid_vvvv&pid_pppp&mi_ii#aaaaaaaaaaaaaaaa#{gggggggg-gggg-gggg-gggg-gggggggggggg}

Where: 
vvvv is the USB vendor ID represented in 4 hexadecimal characters.
pppp is the USB product ID represented in 4 hexadecimal characters.
ii is the USB interface number.
aaaaaaaaaaaaaaaa is a unique, Windows-generated string based on things such as the physical USB port address and/or interface number.
gggggggg-gggg-gggg-gggg-gggggggggggg is the device interface GUID that is used to link applications to device with specific drivers loaded.

Unique Device Paths

Windows requires that the device path be unique for every USB device and interface. If two USB devices are plugged into the same machine with the same VID/PID/Serial string, then the USB Device Path Format described above won’t generate a unique string for the two devices. In this case, Windows generates a unique string similar to the format described in the Composite USB Device Path Format section. This method is also used if the USB device iSerial index is set to 0, indicating that the device does not have a serial string.

Registry Keys Using Device Path Information

The device path is useful for locating the USB device registry keys, where additional settings and information are stored for the device instance. USB device registry keys are stored in the following location:

[HKLMSYSTEMCurrentControlSetEnumUSBVID_vvvv&PID_ppppssss],

Where:
vvvv is the USB vendor ID.
pppp is the USB product ID.
ssss is the USB serial string or the unique, Windows-generate string.

For example, the CP210x VCP drivers stores the COM port number in the Device ParametersPortName registry key as shown in the figure below.

Finding the Device Path Parameters using Device Manager

The vendor ID, product ID, and serial string or unique string can be obtained using device manager. Open the properties for a USB device and click on the 'Details' tab. Select the 'Device Instance Path' property from the combo box to display the device instance path which shares the components of the device path used for CreateFile(). The Device Instance Path is formatted slightly differently as shown in the figure below.

 

What is a Windows USB device path and how is it formatted?的更多相关文章

  1. 痞子衡嵌入式:可通过USB Device Path来唯一指定i.MXRT设备进行ROM/Flashloader通信

    大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是通过USB Device Path来唯一指定i.MXRT设备进行ROM/Flashloader通信. i.MXRT系列高性能微控制器从2 ...

  2. How to match between physical usb device and its drive letter?

    struct tagDrives { WCHAR letter; WCHAR volume[ BUFFER_SIZE ]; } g_drives[ ]; // WCHAR GetUSBDrive( ) ...

  3. Install Slax on USB device (Slax U 盘安装)

    Slax is a modern, portable, small and fast Linux operating system with a modular approach and outsta ...

  4. USB Device Finder

    http://www.velleman.eu/images/tmp/usbfind.c #ifdef __cplusplus extern "C" { #endif #includ ...

  5. "The connection for the USB device '###' was unsuccessful. The device is currently in use"

    一.问题描述 1.情景描述 笔者的物理主机系统是“windows7 64位”,想使用“摄像头录像大师”.这个软件在录制视频的过程中,需要调用windows自带的"windows media ...

  6. EDK II之Device Path

    UEFI中通过Device Path来描述设备的路径,一个完整的路径由多个Device Path Nodes组成. 下面通过输入设备的路径作为例子: PNP0A03 – PCI Host Bridge ...

  7. STM32F4 HAL Composite USB Device Example : CDC + MSC

    STM32F4 USB Composite CDC + MSC I'm in the process of building a USB composite CDC + MSC device on t ...

  8. Android Studio关于USB device not found的解决的方法

    Android Studio关于USB device not found的解决的方法 我们使用Android Studio进行Android开发时.当我们使用真机进行调试时.非常可能会出现USB de ...

  9. [USB] Windows USB/DVD Download Tool

    此工具为微软官方U盘启动盘制作工具 Windows USB/DVD Download Tool 说明:https://www.microsoft.com/en-us/download/windows- ...

随机推荐

  1. Integer to Roman

    Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...

  2. leetcode 37 Sudoku Solver java

    求数独,只要求做出一个答案就可以. 刚开始对题意理解错误,以为答案是唯一的, 所以做了很久并没有做出来,发现答案不唯一之后,使用回溯.(还是借鉴了一下别人) public class Solution ...

  3. 局域网络ping不通

    描述:今天和老崔.老周去公司的新办公地点//相比临时的,十分高大上.当我们把两台台式电脑A.B装好了,网络设置也陪好了,确认能够上网,再装打印机的时候,发现搜索不到打印机的ip(打印机也是有自己的IP ...

  4. DELPHI相应鼠标滚轮

    在鼠标的MouseWheel事件里写入以下内容 if WheelDelta < 0 then    SendMessage(scrollBox1.Handle, WM_VSCROLL, SB_L ...

  5. IOS中如果使用RGB实现背景色

    在开发的过程中.我们往往会碰到图片很多的情况.这时候我们的程序打包就会变得很大.一些纯色的图片可以用RGB来实现.这样可以减少内存的占用MAC本中有数码测色计这个功能.通过这个我们可以获得图片的RGB ...

  6. 学生管理系统-火车订票系统 c语言课程设计

    概要: C 语言课程设计一---学生管理系统 使使用 C 语言实现学生管理系统.系统实现对学生的基本信息和考试成绩的 管理.采用终端命令界面,作为系统的输入输出界面.采用文件作为信息存储介质. 功能描 ...

  7. pyCharm使用

    1.修改文件和代码模板 修改文件头 2.显示行号

  8. SoftmaxLayer and SoftmaxwithLossLayer 代码解读

    SoftmaxLayer and SoftmaxwithLossLayer 代码解读 Wang Xiao 先来看看 SoftmaxWithLoss 在prototext文件中的定义: layer { ...

  9. C# 二维list

    public class ValueList : List<double> { public ValueList() { } } public ValueList[] valListArr ...

  10. 怎么用EDIUS实现跟踪马赛克效果

    我们经常会在一些新闻的视频中看到一些马赛克,这些马赛克一般都是保护人物的隐私权,肖像权什么的.我们时常也会看到即使人物位置发生了变化,被遮挡的地方依旧还是被遮挡住,一点也不用担心因为人物运动而使马赛克 ...