标签:nump water har enum ffffff ntp printf alt 进程id
HMODULE hModule[1024];
DWORD dwRes;
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,GetCurrentProcessId()); //获取的是当前进程ID
EnumProcessModules(hProcess,hModule,sizeof(hModule),&dwRes);
for (int i = 0; i < (dwRes / sizeof(HMODULE)); i++ )
{
WCHAR wzName[MAX_PATH] = {0};
if(GetModuleFileNameEx(hProcess, hModule[i], wzName,sizeof(wzName)/sizeof(TCHAR)))
{
wprintf(_T("%d %x %s \r\n"),i,hModule[i],wzName);
}
}
CloseHandle(hProcess);
标签:nump water har enum ffffff ntp printf alt 进程id
原文地址:http://blog.51cto.com/383156647/2067740