Thanks.
Though I'm having some troubles. I have the below code up to now:
Code:
......
......
HANDLE hProcSnap = NULL;
PROCESSENTRY32 pe32;
MODULEENTRY32 me32;
hProcSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
if(hProcSnap==INVALID_HANDLE_VALUE) ErrHandler();
pe32.dwSize=sizeof(PROCESSENTRY32);
me32.dwSize=sizeof(MODULEENTRY32);
if(Process32First(hProcSnap,&pe32))
{
do
{
Module32First(hProcSnap,&me32);
strcpy(fpth,me32.szExePath);
}while(Process32Next(hProcSnap,&pe32));
}
else
{
ErrHandler();
}
......
......
I'm trying to step through each process and get their module paths. But me32.szExePath returns nothing. please show me my fault.
Thanks.