Hi,
I need to load dll from kernel mode device driver (NDIS miniport drv).
How that could be done? Can I use LoadLibrary and other APIs
of Kernel32.lib?
Thanks in advance.
Igor
Hi,
I need to load dll from kernel mode device driver (NDIS miniport drv).
How that could be done? Can I use LoadLibrary and other APIs
of Kernel32.lib?
Thanks in advance.
Igor
Igor Markov wrote:
I need to load dll from kernel mode device driver (NDIS miniport drv).
How that could be done? Can I use LoadLibrary and other APIs
of Kernel32.lib?
If you mean another kernel-mode driver when you say “DLL”, you can’t do
anything similar in kernel mode without using undocumented calls, and an
NDIS miniport that performed such calls would fail WHQL. If you mean a
user-mode DLL, you can’t do it at all.
Tell us what problem you’re trying to solve, rather than how you propose
to solve it, and we may be able to help.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com
Actually the problem I try to resolve is connecting the miniport device
driver with another virtual device driver (non-NDIS) directly, i.e. by
using direct driver function calls (I assume it’s possible cause all
kernel components are in same mem address space). So basically there is a
question how drivers know exported function addresses of each other.
thanks,
Igor
Igor Markov wrote:
Actually the problem I try to resolve is connecting the miniport device
driver with another virtual device driver (non-NDIS) directly, i.e. by
using direct driver function calls (I assume it’s possible cause all
kernel components are in same mem address space). So basically there is a
question how drivers know exported function addresses of each other.
If you build the other driver as an EXPORT_DRIVER, it can export
functions and act like a kernel-mode DLL. You link your miniport driver
with the .LIB left behind by building the DLL-like driver. You can even
define initialization and termination functions named DllInitialize and
DllUnload.
But don’t go too far down this path before checking that WHQL will
certify your driver with these nonstandard imports. They are very fussy
about fixed-architecture things like NDIS miniports.
If you have what’s called an “NDIS miniport with a WDM lower edge”, the
import restrictions are greatly relaxed. If WHQL still won’t let you
through, try using a PnP direct-call interface via
IRP_MN_QUERY_INTERFACE.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com
Forget about calling any DLLs built for Win32 or any Win32 APIs
from NDIS miniport.
This is impossible in principle.
NDIS miniport is only to drive your netcard, not to do any other
complex things.
Max
----- Original Message -----
From: “Igor Markov”
To: “NT Developers Interest List”
Sent: Tuesday, November 12, 2002 1:40 PM
Subject: [ntdev] loading dll from the driver
> Hi,
>
> I need to load dll from kernel mode device driver (NDIS miniport
drv).
> How that could be done? Can I use LoadLibrary and other APIs
> of Kernel32.lib?
>
> Thanks in advance.
> Igor
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
What is the lower driver? Is it a WDM driver? If yes - then why not
use NDIS/WDM way?
Max
----- Original Message -----
From: “Igor Markov”
To: “NT Developers Interest List”
Sent: Tuesday, November 12, 2002 3:46 PM
Subject: [ntdev] Re: loading dll from the driver
> Actually the problem I try to resolve is connecting the miniport
device
> driver with another virtual device driver (non-NDIS) directly, i.e.
by
> using direct driver function calls (I assume it’s possible cause all
> kernel components are in same mem address space). So basically there
is a
> question how drivers know exported function addresses of each other.
>
> thanks,
>
> Igor
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>