Topic created on: March 5, 2011 10:26 CST by rootop .
I'm working on a tool to view and edit PE/COFF information.
Yes, I am very aware that there are tons of these already, I'm merely building it to fit my own needs and use of simplicity.
As the title says I want to be able to list modules loaded by a specified program. Much like dependency walker.
My first approach was to LoadLibraryEx() the library and then use DbgHelp:s function EnumerateLoadedModules on the result. But to my big disappointment it turned out that the HINSTANCE that gets enumerated must be loaded as a process.
So, any ideas on how to approach this? I know I could build an application that loads the DLL:s DllMain function and go from there but I wish to limit down to a single DLL when it gets compiled.