Prev: Using SHChangeNotifyRegister
Next: #32770 window order
From: Timo Kunze on 7 Nov 2009 10:37 Hi, I have a root path, e. g. J:\, and want to determine the type of the bus this drive is connected to. How would I do this? I know how to enumerate the *devices* on a specific bus (using the SetupDi* API), but I don't know how to enumerate the *volumes* on a specific bus. Also I hope there's a more direct way than searching for drive J:\ within *all* drives on the USB bus. Timo -- www.TimoSoft-Software.de - Unicode controls for VB6 "Those who sacrifice freedom for safety deserve neither." "Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf demokratischem Wege – durchsetzen."
From: Christian ASTOR on 7 Nov 2009 11:05 On 7 nov, 16:37, Timo Kunze <TKunze71...(a)gmx.de> wrote: > I have a root path, e. g. J:\, and want to determine the type of the bus > this drive is connected to. How would I do this? You can call DeviceIoControl() with IOCTL_STORAGE_QUERY_PROPERTY (BusType member)
From: Timo Kunze on 7 Nov 2009 11:53 Christian ASTOR schrieb: > You can call DeviceIoControl() with IOCTL_STORAGE_QUERY_PROPERTY > (BusType member) Thanks. Do you know whether this requires any special user rights? Timo -- www.TimoSoft-Software.de - Unicode controls for VB6 "Those who sacrifice freedom for safety deserve neither." "Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf demokratischem Wege – durchsetzen."
From: Christian ASTOR on 7 Nov 2009 12:58 On 7 nov, 17:53, Timo Kunze <TKunze71...(a)gmx.de> wrote: > Christian ASTOR schrieb: > You can call DeviceIoControl() with IOCTL_STORAGE_QUERY_PROPERTY > > (BusType member) > > Thanks. Do you know whether this requires any special user rights? No, no special rights. At Least on XP, on which I've tested it...
From: Uwe Sieber on 8 Nov 2009 14:31 Timo Kunze wrote: > Christian ASTOR schrieb: >> You can call DeviceIoControl() with IOCTL_STORAGE_QUERY_PROPERTY >> (BusType member) > Thanks. Do you know whether this requires any special user rights? No, you can call CreateFile with 0 for dwDesiredAccess (tested on W2K .. Win7). Uwe
|
Pages: 1 Prev: Using SHChangeNotifyRegister Next: #32770 window order |