EvtDeviceProcessQueryInterfaceRequest callback gets *calling* device handle?!?

WTF???

What’s the point of that???

Surely it makes *much* more sense to pass the handle of the device
owning the callback so it can access its own device extension to fill in
interface data?!? Or am I missing something obvious?

Now how can I do that?

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>

Mark McDougall wrote:

Surely it makes *much* more sense to pass the handle of the device
owning the callback so it can access its own device extension to fill in
interface data?!? Or am I missing something obvious?

Scrap that - I stuffed up!!! Sorry…

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>

Mark McDougall wrote:

I’m stuck!

I have a bus driver that (statically) enumerates child PDOs.
I have an FDO that binds to these child PDOs.

I’m trying to pass information from the bus driver to this FDO via an
interface. The information is stored in the bus driver device extension.

If I define the interface in the child PDO, it doesn’t have access to
the bus driver device extension.

If I define the interface in the bus driver, I can’t figure out how to
get the device object of the bus driver in order to issue a
queryinterface call. I would’ve thought I could use
…getattacheddevice(PDO) but it doesn’t return the bus driver device
object, it returns something else (what?)?!?

What’s the easy way to achieve what I’m trying to do?
TIA

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>

Define the interface on the PDO. To get access the parent FDO device,
call WdfPdoGetParent(). Now you have access to the FDO data that you
need to export

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Mark McDougall
Sent: Thursday, March 01, 2007 7:35 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] EvtDeviceProcessQueryInterfaceRequest callback gets
*calling* device handle?!?

Mark McDougall wrote:

I’m stuck!

I have a bus driver that (statically) enumerates child PDOs.
I have an FDO that binds to these child PDOs.

I’m trying to pass information from the bus driver to this FDO via an
interface. The information is stored in the bus driver device extension.

If I define the interface in the child PDO, it doesn’t have access to
the bus driver device extension.

If I define the interface in the bus driver, I can’t figure out how to
get the device object of the bus driver in order to issue a
queryinterface call. I would’ve thought I could use
…getattacheddevice(PDO) but it doesn’t return the bus driver device
object, it returns something else (what?)?!?

What’s the easy way to achieve what I’m trying to do?
TIA

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266


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</http:>

Doron Holan wrote:

Define the interface on the PDO. To get access the parent FDO device,
call WdfPdoGetParent(). Now you have access to the FDO data that you
need to export

Thanks again!!!

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>