Subj : problem with kill a process To : borland.public.cpp.borlandcpp From : "saso badovinac" Date : Sat Jan 10 2004 09:01 pm hi i have made a small program that using borland c++ 5.5 that terminates a process with the TerminateProcess function. now the program works fine, but only if i terminate a process that has the same user. now what my problem is that if i run my program as an administrator i am not able to terminate processes from other users (as an admin i should be able to). HANDLE FSnapshotHandle=CreateToolhelp32Snapshot(0x00000002, 0); PROCESSENTRY32 plist32; plist32.dwSize = sizeof(plist32); ContinueLoop = Process32First(FSnapshotHandle, &plist32); while (ContinueLoop) { //----------- i am using this for windows 9x char nov[255] =""; for (int i = strlen(plist32.szExeFile)-strlen(p); i <= strlen(plist32.szExeFile); i++) nov[i-strlen(plist32.szExeFile)+strlen(p)] = plist32.szExeFile[i]; //------------------------------------------ if (!lstrcmpi(nov,p)) { // i belive that at this point i am missing sommething to be able to get the terminate process rights TerminateProcess(OpenProcess((0x0001),0,plist32.th32ProcessID), 0); } ContinueLoop = Process32Next(FSnapshotHandle, &plist32); } CloseHandle(FSnapshotHandle); .