How to get a function address of driverX from driverY ?

Hi all,

My problem, a driver(X) is providing some information to the user app, thru
WMI (but not thru IOCTL). Bcoz of this I cannot get that information
provided by this driver(X) from my driver(Y). I can find the core function
name (not the WMI stuffs) which is providing the information.

With this ‘function name’ as a known parameter, can I find the address of
that function and use the same (by function pointer) in my driver(Y)?


Thanks,
T.V.Gokul.

If you do not own the source code for driver X this is not something
that is reasonable to do. If you do own the source code, then X can
either export the functions as an export driver or support a direct-call
interface through IRP_MN_QUERY_INTERFACE. The latter mechanism is
appropriate for the case where X is below Y in a PnP stack (parent-child
relationship).


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gokul TV
Sent: Thursday, July 10, 2008 5:34 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to get a function address of driverX from driverY ?

Hi all,

My problem, a driver(X) is providing some information to the user app,
thru WMI (but not thru IOCTL). Bcoz of this I cannot get that
information provided by this driver(X) from my driver(Y). I can find the
core function name (not the WMI stuffs) which is providing the
information.

With this ‘function name’ as a known parameter, can I find the address
of that function and use the same (by function pointer) in my driver(Y)?


Thanks,
T.V.Gokul. — 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

You defintly can NOT just call some random function in another driver, even
if you know the name and find the address. That function may assume things
like locks have already been aquired before it was called or that it only
runs in a specific worker thread so has intrinsic concurrency management.

Jan

My problem, a driver(X) is providing some information to the user app, thru
WMI (but not thru IOCTL). Bcoz of this I cannot get that information
provided by this driver(X) from my driver(Y). I can find the core function
name (not the WMI stuffs) which is providing the information.

With this ‘function name’ as a known parameter, can I find the address of
that function and use the same (by function pointer) in my driver(Y)?

“Gokul TV” wrote in message news:xxxxx@ntdev…
Hi all,

My problem, a driver(X) is providing some information to the user app, thru WMI (but not thru IOCTL). Bcoz of this I cannot get that information provided by this driver(X) from my driver(Y). I can find the core function name (not the WMI stuffs) which is providing the information.

With this ‘function name’ as a known parameter, can I find the address of that function and use the same (by function pointer) in my driver(Y)?
Drivers can use “WMI stuffs”. Read on IoWMI… functions in the WDK documentation.

Regards,
–PA

Thanks a lot for everyone for their valuable inputs. Since I find the other
driver, which is not owned by me has implemented WMI stuff, let me
experiment with the IoWMI… stuff.


Regards,
T.V.Gokul.