From: Sri on
Hi,
I'm working on a virtual usb bus(something like usb-over-network). Lets say,
I redirect a USB pen drive. It enumerates and shows up as a drive. Now I have
a requirement where in I have to know all the nodes in this tree till my pdo.
For e.g, if the pen drive appears as "E:". The I should be able to get all
the nodes from my PDO to the top of the device stack. So I started using
CM_xx APIs (and SetupDixxx).

To begin with, I register for a notification for a private interface on my
virtual bus. When I get a notification (i.e for my pdo, when a virtual usb
device is enumerated), I have to traverse (CM_Get_Child) all the way down in
the tree. However I'm unable to get the complete tree.

These are some of the dumps :
In case of XP, I get 3 nodes -
ClassGUID = {A5DCBF10-6530-11D2-901F-00C04FB951ED}
DeviceInstanceId = USB\Vid_aaaa&Pid_bbbb\07541793CBBC

ClassGUID = {4D36E967-E325-11CE-BFC1-08002BE10318}
DeviceInstanceId = USBSTOR\DISK&VEN_&PROD_PPPPPP&REV_YYYY\07541793CBBC&0

ClassGUID = {71A27CDD-812A-11D0-BEC7-08002BE2092F}
DeviceInstanceId = STORAGE\REMOVABLEMEDIA\8&13AB5E99&1&RM
--------------------------------------------------------------------------------
In case of (Vista and above) I get only two nodes :
ClassGUID = {A5DCBF10-6530-11D2-901F-00C04FB951ED}
DeviceInstanceId = USB\Vid_aaaa&Pid_bbbb\07541793CBBC

ClassGUID = {4D36E967-E325-11CE-BFC1-08002BE10318}
DeviceInstanceId = USBSTOR\DISK&VEN_&PROD_PPPPPP&REV_YYYY\07541793CBBC&0
-------------------------------------------------------------------------------

Could someone help me out?
Any comments are welcome.

Thanks,
Sri
From: Scott Noone on
The storage stack has changed in this area, so I'm not sure that what you're
seeing isn't correct. You can try seeing what DeviceTree reports and if that
matches what you're seeing:

http://www.osronline.com/article.cfm?article=97

-scott

--
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"Sri" <Sri(a)discussions.microsoft.com> wrote in message
news:2DA9565C-3D22-4901-9123-DCF7D8B98A08(a)microsoft.com...
> Hi,
> I'm working on a virtual usb bus(something like usb-over-network). Lets
> say,
> I redirect a USB pen drive. It enumerates and shows up as a drive. Now I
> have
> a requirement where in I have to know all the nodes in this tree till my
> pdo.
> For e.g, if the pen drive appears as "E:". The I should be able to get all
> the nodes from my PDO to the top of the device stack. So I started using
> CM_xx APIs (and SetupDixxx).
>
> To begin with, I register for a notification for a private interface on my
> virtual bus. When I get a notification (i.e for my pdo, when a virtual usb
> device is enumerated), I have to traverse (CM_Get_Child) all the way down
> in
> the tree. However I'm unable to get the complete tree.
>
> These are some of the dumps :
> In case of XP, I get 3 nodes -
> ClassGUID = {A5DCBF10-6530-11D2-901F-00C04FB951ED}
> DeviceInstanceId = USB\Vid_aaaa&Pid_bbbb\07541793CBBC
>
> ClassGUID = {4D36E967-E325-11CE-BFC1-08002BE10318}
> DeviceInstanceId = USBSTOR\DISK&VEN_&PROD_PPPPPP&REV_YYYY\07541793CBBC&0
>
> ClassGUID = {71A27CDD-812A-11D0-BEC7-08002BE2092F}
> DeviceInstanceId = STORAGE\REMOVABLEMEDIA\8&13AB5E99&1&RM
> --------------------------------------------------------------------------------
> In case of (Vista and above) I get only two nodes :
> ClassGUID = {A5DCBF10-6530-11D2-901F-00C04FB951ED}
> DeviceInstanceId = USB\Vid_aaaa&Pid_bbbb\07541793CBBC
>
> ClassGUID = {4D36E967-E325-11CE-BFC1-08002BE10318}
> DeviceInstanceId = USBSTOR\DISK&VEN_&PROD_PPPPPP&REV_YYYY\07541793CBBC&0
> -------------------------------------------------------------------------------
>
> Could someone help me out?
> Any comments are welcome.
>
> Thanks,
> Sri