IoGetDeviceObjectPointer related Question

Hi all,
I have a requirement to sent (irp mn)Query interface calls to the PCI root
bus driver. To obtain the device object for the PCI root bus driver, I am
using IoGetDeviceObjectPointer(). Now my question is, how do I get the
deviceobject name of PCI root bus driver,which is the first parameter for
this API.

The only detail that I could look up from the registry is its device
hardware ID which is PNP0A03. ObjDir did not give any clue as to what its
symbolic link is…Any help in the regard is greatly appreciated.

Thanks
Ajith.


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

>To obtain the device object for the PCI root bus driver, I am using
IoGetDeviceObjectPointer(). Now my question is, how do I get the
deviceobject name of PCI root bus driver,which is the first parameter for
this API.

You can’t do that. The IRP_MN_QUERY_INTERFACE requests are meant to be sent
to the PCI child devices. For that you need the PDO of the individual PCI
devices. The FDO or PDO of the bus driver wouldn’t help you. What are you
trying to do?

-Eliyas

-----Original Message-----
From: Ajith JayaMohan [mailto:xxxxx@hotmail.com]
Sent: Monday, July 31, 2000 2:52 PM
To: NT Developers Interest List
Subject: [ntdev] IoGetDeviceObjectPointer related Question

Hi all,
I have a requirement to sent (irp mn)Query interface calls to the PCI root
bus driver. To obtain the device object for the PCI root bus driver, I am
using IoGetDeviceObjectPointer(). Now my question is, how do I get the
deviceobject name of PCI root bus driver,which is the first parameter for
this API.

The only detail that I could look up from the registry is its device
hardware ID which is PNP0A03. ObjDir did not give any clue as to what its
symbolic link is…Any help in the regard is greatly appreciated.

Thanks
Ajith.


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

>You can’t do that. The IRP_MN_QUERY_INTERFACE requests are meant to ?>be

sent to the PCI child devices. For that you need the PDO of the >individual
PCI devices. The FDO or PDO of the bus driver wouldn’t help >you. What are
you trying to do?

I have a driver that does a PCI Bus Walk and looks for PCI Hot-Plug Slots
available in the system. The current driver is a WDM driver installed in the
“Other Devices” category in device manager and uses “HalGetBusData()” and
“HalGetBusDataByOffset()” to obtain all the PCI Config space information. I
am trying to replace these calls with PNP calls (IRP_MN_QUERY_INTERFACE)sent
to the lower stack lower and after obtaining the pci bus standard interface,
i intend to use equivalent function defined in them instead of HalXxx…().
But the problem is lower stack device returns STATUS_NOT_SUPPORTED to these
calls, that is the lower driver does not have this interface.

The next thing I tried was to convert my driver into a upper filter driver
for PCI and sent down the required PNP requests when AddDevice gets called
for PCI root bus. This approach works PROPERLY and I am able to obtain the
interface. But I think configuring my driver as a upper filter just to
perform a bus walk is a kinda overkill and would like to obtain the PCI FDO
directly thro IoGetDeviceObjectPointer call.

  • ajith

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

As you might know, FDOs are unnamed and PDOs have auto-generated names. So
you cannot get hold of the deviceobject pointer using
IoGetDeviceObjectPointer function. Unfortunately PCI bus driver also doesn’t
register an interface for it’s devnode so that you can use the Notification
mechanism to get the symbolic link. Therefore, the only option left is to be
an upper filter of the PCI bus.

-Eliyas

-----Original Message-----
From: Ajith JayaMohan [mailto:xxxxx@hotmail.com]
Sent: Tuesday, August 01, 2000 8:14 AM
To: NT Developers Interest List
Subject: [ntdev] RE: IoGetDeviceObjectPointer related Question

You can’t do that. The IRP_MN_QUERY_INTERFACE requests are meant to ?>be
sent to the PCI child devices. For that you need the PDO of the >individual

PCI devices. The FDO or PDO of the bus driver wouldn’t help >you. What are
you trying to do?

I have a driver that does a PCI Bus Walk and looks for PCI Hot-Plug Slots
available in the system. The current driver is a WDM driver installed in the

“Other Devices” category in device manager and uses “HalGetBusData()” and
“HalGetBusDataByOffset()” to obtain all the PCI Config space information. I
am trying to replace these calls with PNP calls (IRP_MN_QUERY_INTERFACE)sent

to the lower stack lower and after obtaining the pci bus standard interface,

i intend to use equivalent function defined in them instead of HalXxx…().
But the problem is lower stack device returns STATUS_NOT_SUPPORTED to these
calls, that is the lower driver does not have this interface.

The next thing I tried was to convert my driver into a upper filter driver
for PCI and sent down the required PNP requests when AddDevice gets called
for PCI root bus. This approach works PROPERLY and I am able to obtain the

interface. But I think configuring my driver as a upper filter just to
perform a bus walk is a kinda overkill and would like to obtain the PCI FDO
directly thro IoGetDeviceObjectPointer call.

  • ajith

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)