Device Enumeration - USBSTOR Instance IDs

Background:

When a USB removable storage is first connected to Windows, the Windows system creates an entry in the registry under:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR[DEVICE_CLASS_ID][UNIQUE_INSTANCE_ID]

For instance, a registry key looks like:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR\Disk&Ven_SanDisk&Prod_U3_Cruzer_Micro&Rev_3.27\0000161511737EFB&0

My question is:

What does “&0” in the instance ID “0000161511737EFB&0” mean?

My understanding is:

If unique serial number is available, instance ID is generated using serial number of the device. And in this particular example, “0000161511737EFB” is indeed the serial number. But I am not sure where does “&0” come from.

Why does it matter? The string and path are opaue. You should never rely on the format of each part of the string nor its contents. The &0 may be added by the OS for any number of reasons.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Saturday, October 29, 2016 10:48 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Device Enumeration - USBSTOR Instance IDs

Background:

When a USB removable storage is first connected to Windows, the Windows system creates an entry in the registry under:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR[DEVICE_CLASS_ID][UNIQUE_INSTANCE_ID]

For instance, a registry key looks like:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR\Disk&Ven_SanDisk&Prod_U3_Cruzer_Micro&Rev_3.27\0000161511737EFB&0

My question is:

What does “&0” in the instance ID “0000161511737EFB&0” mean?

My understanding is:

If unique serial number is available, instance ID is generated using serial number of the device. And in this particular example, “0000161511737EFB” is indeed the serial number. But I am not sure where does “&0” come from.


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>