Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hello,
I am making a PE DLL loader. I managed to successfully create a GetProcAddress function, but am having issues reading the import table. Here is the code:
nexos wrote:Hello,
I am making a PE DLL loader. I managed to successfully create a GetProcAddress function, but am having issues reading the import table. Here is the code:
Have you loaded the DLL at the virtual address given by peHeader->optHeader.ImageBase? As I understand it, PE executables are linked as though they're expected to be mapped at a specific memory location, and if not loaded there, they need to be relocated. Looking at your code, you're assuming moduleBase==peHeader->optHeader.ImageBase. Is that true?