Load Kernel32.dll onto System Address Space at "runtime"

Load Kernel32.dll onto System Address Space at "runtime"

Post by Jacky Lu » Thu, 04 Mar 2004 11:34:26


Dear guru,
When windows is fully loaded, kernel32.dll is located at a high address
(0x77...), if you try to load it with MapFileView after win is loaded, it
gives you a low address, can you emulate the ntloader so that kernel32.dll
is somewhat virtually loaded at that high address?
Thank you
Jack
 
 
 

Load Kernel32.dll onto System Address Space at "runtime"

Post by Gary Chans » Thu, 04 Mar 2004 14:19:34


Kernel32.dll would already be mapped at that higher address (I'm
assuming you mean to use the same address otherwise your question makes no
sense at all) so trying to MapViewOfFile specifying this same load address
will fail, but why can't you just access it where it is already mapped?

--

-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.yqcomputer.com/
XXXX@XXXXX.COM

 
 
 

Load Kernel32.dll onto System Address Space at "runtime"

Post by Alex Iones » Sun, 07 Mar 2004 14:14:03

Jacky,

Just call LoadLibrary or GetModuleHandle and you'll get the high
address...assuming this is what you want to do...

Best regards,
Alex Ionescu