PROCESSENTRY32 pe32 = {0};
HANDLE hSS;
// Create a snapshot of your system
hSS = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS|
return FALSE;
//prepare the enumeration
pe32.dwSize = sizeof(PROCESSENTRY32);
//now get the first process running
BOOL bRet = Process32First(hSS, &pe32);
//iterate through all proccesse in the snapshot
while(FALSE != bRet)
{
if( pe32.dwSize != sizeof(PROCESSENTRY32) )
break;
// get the next process running
bRet =Process32Next(hSS, &pe32);
}
//close the snapshot.
CloseToolhelp32Snapshot(hSS);
My problem was that when i called the Process32First function a data abort exception has been thrown in the toolhelp.dll. On my development machine CE5 and CE6 are installed in parallel which works well. But, for my application debugging, VisualStudio 2005 and/or one of my Remote Tools copied the toolhelp.dll located in "\Program Files\CE Remote Tools\5.01\target\wce500\armV4i" to my target. It replaced the CE6 toolhelp.dll with the CE5 one from the folder mentioned above. The problem is, that Microsoft has changed the PROCESSENTRY32 struct: Two new members have been added.
Read more! Post this to a friend!