Maxim,
I got the device numbers for the 2 logical units along with their volume IDs
using the method you mentioned.
With this drive, at startup only the first logical drive is visible. The
second one opens up only after successful authentication.
To figure out if the second drive opened up and is available, I would need
to match the device instance IDs of the 2 drive letters. I can't use the
volume ID since it is assigned by windows?
However, like I mentioned before, I am able to get only one instance ID
using the SetupDi function.
Also if multiple USB devices are plugged in, DeviceInstanceID is the only
way I can identify multiple instances of the same device present on the
system, right?
"Maxim S. Shatskih" wrote:
> > I guess this is understandable since there is only one physical device.
> > However, is there a function that I can use to get both the drive letters?
>
> Enumerate all letters, call IOCTL_STORAGE_GET_DEVICE_NUMBER on each.
>
> Open each USBSTOR's device, and call the same IOCTL on each.
>
> Then match the results.
>
> --
> Maxim S. Shatskih
> Windows DDK MVP
>
> http://www.storagecraft.com
>
> .
>