Re[2]: Instance ID for USB device

> If the device doesn’t get the same ID, then it looks like an entirely

different device to the system and the driver. In case the driver
(and/or a usermode application) safes some configuration data in the
registry key of the device instance, then you get different
configurations depending on the port you connect the device to, even if
*physically* it’s the same device. For me this is a very good reason to
give it the same ID each time.

I agree, the fact that devices don’t show up with a consistent name is
annoying. However, I’m the wrong person to comment on any of this. I
have no knowledge of Windows internals. My point is simply that when
wanting to tie things to the actual device, use the serial number
(which should be available to the driver and hopefully exposed to
higher levels of software).

This is not just a theoretical problem:
I own a USB<->COM adapter. When I connected it to my PC the first time,
it showed up as COM4. Later for some reason I’ve put it into another USB
port, and it showed up as COM5. I found this *very* inconvenient.
It gets even worse if you have a device for which you only have unsigned
drivers, since Windows then will start the interactive setup, including
the dialog that warns about unsigned drivers. If the device would always
get the same ID, this inconvenience would only happen only the very
first time you connect the device to the PC.

In my case (firewire not usb, I’m assuming it works the same but could
be wrong) I only
get asked about drivers etc when attaching a device with a serial
number that windows has not seen before. The API I expose to my
applications allows them to open either the first available device or
to specify the “unit id” of the device they would like to use. My
unit ids are tied to the serial number and so are always the same
regardless of how the device is attached.