Your bus driver knows only about the PDOs it enumerates. Any subsequent enumeration by those children us not visible to the (now) grandparent (your bus driver). This is by design. Please do not fight the system’s design to get this type if info. If you want to walk the pnp tree, do it in user mode.
Btw, a driver may *never* send query device relations/bus relations on its own. This is a pnp state changing irp and the driver you are sending it to will expect that state change to take place and be processed by the pnp manager, but it won’t be because it was your driver who sent it and now that change is lost. for instance, if the driver reported as pdo as missing gor the war you sent, no surprise remove will be sent. When the stack is turn down later, the bus driver will delete the pdo because it was reported as missing, but the pno manager will bugcheck because a pdo was deleted and not actually reported as missing from its pic.
d
dent from a phine with no keynoard
-----Original Message-----
From: disney_cheng@qq.com
Sent: Tuesday, February 22, 2011 6:22 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How to get the whole device tree
My virtual bus driver want to know the status of the upper drivers.
If the bus fail to load the usbstor.sys which is right upon it, it will know that. But sometimes it load the usbstor.sys successfully, and the usbstor.sys load the disk.sys unsuccessfully. It doesn’t know this, and treat it as a succeed.
I think the bus should know the situation about the whole device tree. But I can not get that informations.
Actually that was rather bad advice. Leave the pointers in the
DeviceObject alone. Leave the pointers in the DriverObject alone.
There is no good reason for you to be enumerating the device objects
of any driver other than your own, and then only if you are a bus
driver, as you probably need a list of the device objects you provide
as child devices.
What is it that you are trying to do that requires the enumeration of
device objects?
Mark Roddy
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer