How to enum another process modules in Windows XP 64bit

时间秒杀一切 提交于 2019-12-11 13:54:51

问题


I already asked how to enum 32bit process modules from a 64bit process here. And the answer was EnumProcessModulesEx. All works fine on Windows 7 x64, but what about Windows XP x64? It seems that this api is supported on Vista and up. So what's the way to do it there?


回答1:


CreateToolHelp32Snapshot will do it.




回答2:


Probably something like this. Wrote it in notepad so might be wrong. But you get the idea.

HANDLE        hSnapshot = CreateToolhelp32Snapshot( TH32CS_SNAPMODULE, dwPID );
MODULEENTRY32 me32      = {0};

me32.dwSize = sizeof(MODULEENTRY32);
Module32First( hSnapshot, &me32 );

do {
  ...
} while( Module32Next( hSnapshot, &me32 ) );

CloseHandle( hSnapshot );


来源:https://stackoverflow.com/questions/7486495/how-to-enum-another-process-modules-in-windows-xp-64bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!