Created
March 11, 2013 01:23
-
-
Save xophiix/5131322 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
#include <Tlhelp32.h.> | |
using namespace std; | |
int main() | |
{ | |
HANDLE h= CreateToolhelp32Snapshot(8, 780); | |
MODULEENTRY32 me; | |
int ret = Module32First(h, &me); | |
while (ret) | |
{ | |
printf("%p\t\%s\n", me.modBaseAddr, me.szModule); | |
ret = Module32Next(h, &me); | |
} | |
CloseHandle(h); | |
return 0; | |
} |
warning, you should do me.dwSize = sizeof(MODULEENTRY32);
and on my system, if i don't do it, Module32First will just return false.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello i'm using your code with some modification and work well.
how can we get the dll loaded from a process.exe modbaseaddr?