Seeing that the usb device class is used by many many different drives
(not the right thing to do, but it is done nevertheless), I don’t know
how far you are going to get. Also, a hardcoded list might break when
MSFT renames a driver to some other name, but I digress…
…you could do this with heuristics. If you are assigned resources in
start device, you are most likely on a host controller for instance.
You could use IoGetDeviceInterfaces, pass in your stack’s PDO and
specify well known device interfaces (like GUID_DEVINTERFACE_USB_HUB,
GUID_DEVINTERFACE_USB_DEVICE, or GUID_DEVINTERFACE_USB_HOST_CONTROLLER
for host controllers/hubs/devices etc etc).
d
– I can spell, I just can’t type.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Nikolay Korneev
Sent: Tuesday, July 18, 2006 11:43 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to find FDO?
This begs the question, why do you need to know who is the FDO in the
stack? What are you going to do with that information once you have
it?
Perhaps there is another way.
I’ve registered as upper class filter for USB setup class. So my driver
is called for host-controllers, hubs, storage devices and some other…
And I want to know in which particular stack am I. I wanted to know that
getting FDO’s driver object and comparing its name with the list of well
known usb drivers.
I would be happy if I could get the service name for a device like
user-mode SetupDiGetDeviceRegistryProperty( SPDRP_SERVICE ) does. But
IoGetDeviceProperty does’t provide this type of info.
Thank you, Doron.
–
Best regards, Nikolay
mailto:xxxxx@gmail.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer