terminating processes
-
seems i have a problem compiling this code //killprocess.c #include #include int main(int argc,char *argv[]) { char szName[100]="something.exe"; TerminateProcess(szName); return 0; } What am I doing wrong? -Ryan M.
-
seems i have a problem compiling this code //killprocess.c #include #include int main(int argc,char *argv[]) { char szName[100]="something.exe"; TerminateProcess(szName); return 0; } What am I doing wrong? -Ryan M.
-
seems i have a problem compiling this code //killprocess.c #include #include int main(int argc,char *argv[]) { char szName[100]="something.exe"; TerminateProcess(szName); return 0; } What am I doing wrong? -Ryan M.
TerminateProcess
takes a handle to a process and an exit code as parameters so your code as written cannot compile. You can get a handle to a process usingOpenProcess
given the Process ID which you can see in Task Manager, or enumerate using the ToolHelp functionsCreateToolhelp32Snapshot, Process32First
andProcess32Next
. Alternatively you could look for a 'kill' program, I think there's one in the Resource kit. Paul -
seems i have a problem compiling this code //killprocess.c #include #include int main(int argc,char *argv[]) { char szName[100]="something.exe"; TerminateProcess(szName); return 0; } What am I doing wrong? -Ryan M.