Sure you can. If you look at a SCSIPORT/Miniport stack you will see that
ScsiPort itself is a dll that does not exist in memory until the first
miniport calls ScsiPortInitialize. You may need to define a do nothing
DriverEntry that returns STATUS_SUCCESS, but you can load a DLL from a
kernel mode driver given that you have linked with the DLL’s import lib.
You define a jump table and reference all functions or storage thru that
jump table. When the dll’s initialize function is called, it builds that
jump table and returns it to you. What then, do you need to relocate? You
could even have multiple jump tables for different loaded dells.
Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com
-----Original Message-----
From: Nachum Kanovsky [mailto:xxxxx@yahoo.com]
Sent: Wednesday, September 12, 2001 2:33 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Custom kernel mode interrupt functions
Can I load a dll from within my device driver? And even if I can, It
would then require that the interrupt routine couldn’t change between
runnings device uses. The driver is for a Pci Dsp based card, that will
only send interrupts to the host during a host initiated session, so if
I want to change the interrupt function between host sessions, I would
still need to ‘relocate’ code into kernel memory for this.
Anyway, what are the advantages and disadvantages besides this for using
a dll versus attempting to import code?
Nachum
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Gary Little
Sent: Wednesday, September 12, 2001 8:59 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Custom kernel mode interrupt functions
But would it not be easier to use a kernel dll, with specific loader and
initialization routines? Thus, if in IOCTL_RED you call the loader
function for RED.DLL and for IOCTL_GREEN you call the loader function
for GREEN.DLL.
Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com
-----Original Message-----
From: Peter Viscarola [mailto:xxxxx@osr.com]
Sent: Wednesday, September 12, 2001 11:21 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Custom kernel mode interrupt functions
Custom kernel mode interrupt functions> “Nachum Kanovsky”
wrote in message news:xxxxx@ntdev…
> Is it possible to have a function written by a user copied into kernel
address space by a driver?
Sure. It depends on precisely the type of code that you wanna “load”.
It won’t necessarily be EASY… consider the issue of relocating the
code, run time functions that might be called, etc.
But COULD you do it? Absolutely…
Peter
OSR
—
You are currently subscribed to ntdev as: xxxxx@broadstor.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: xxxxx@yahoo.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
—
You are currently subscribed to ntdev as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com