Hi all, long time no see
Ok, today I've got an advanced question... It's about DLL's, or PE files... everyone knows how to load a DLL... just call LoadLibrary (or dlopen in unix), and that's it... Well... I need something different. The thing is, I don't have the dll on the disk, or at least, alone... I have it on a chunk that I load up to the memory. So, what I need, is to load one DLL directly from a memory chunk... in other words, write my own LoadLibrary...
I theory, this is one of the solutions:
1 Allocate a big enough virtual memory block, preferably at the preferred address of the DLL.
2 Unpack the DLL into the memory, according to section alignment. Patch relocation if relocated.
3 Load new DLLs needed by the DLL
4 Patch DLL's import table.
5 Call DLL's entry point.
Well... this is a very standard theory... from this point forward, I need more details... Can anyone help me out?
Thanks in advance...