怎样获得某个进程的内存基地址?

#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; 
} 

 

posted @ 2014-06-24 20:51  Max Woods  阅读(595)  评论(0编辑  收藏  举报