HMODULE win32
Saturday, 19. July 2008, 12:13:08
This week, I have worked on a project.. and I had to test routine that I wrote in assembly ...
For a test, I used LoadLibraryEx to load in memory a DLL asking to windows to load dll into memory without applying relocations, import tables and without run DllEntryPoint code...
LoadLibraryEx can be invoked using the parameter LOAD_LIBRARY_AS_DATAFILE how flag ..
and the library is loaded in memory how a block of data, but with differences..
The o.s. doesn't create the sections available into PE header.. and the HMODULE (in WIN32 normally it match with the base address of object) has set latest bit.. (and if used how pointer.. the first byte is Z of 'MZ' signature)... .... it will used internally from MS to understand how get an image in memory?
For a test, I used LoadLibraryEx to load in memory a DLL asking to windows to load dll into memory without applying relocations, import tables and without run DllEntryPoint code...
LoadLibraryEx can be invoked using the parameter LOAD_LIBRARY_AS_DATAFILE how flag ..
HMODULE LoadLibraryEx( LPCTSTR lpFileName, HANDLE hFile, DWORD dwFlags );
and the library is loaded in memory how a block of data, but with differences..
The o.s. doesn't create the sections available into PE header.. and the HMODULE (in WIN32 normally it match with the base address of object) has set latest bit.. (and if used how pointer.. the first byte is Z of 'MZ' signature)... .... it will used internally from MS to understand how get an image in memory?