Enumerate all GUID_DEVINTERFACE_CDROM/_DISK, call IOCTL_STORAGE_GET_DEVICE_NUMBER for each.
Also call IOCTL_STORAGE_GET_DEVICE_NUMBER for each drive letter and match them.
--
Maxim S. Shatskih
Windows DDK MVP
http://www.storagecraft.com
"MetaJack" <> wrote in message news:99F040BC-61DC-41F5-BF85-...
>I am trying to find a way to call CM_Query_And_Remove_SubTree() or
> SetupDiRemoveDevice() on the basis of the associated DOS drive letter. There
> seem to be multiple name-spaces for both physical and logical drives. I have
> found a number of well-hidden bridges for tying some of them together, but
> have been unable to find one that lets me start with the drive letter and
> chain down to the ID I need to drive one of the remove functions.
>
> Any Suggestions?