you can't kill a process and do cleanup from the outside. Obviously the process has to know when to end and do the cleanup. TerminateProcess it the only direct method. There are many others. The program doesn't do cleanup, but the OS obvously frees up the resources.
http://www.diamondcs.com.au/index.ph...nation-methods
http://www.diamondcs.com.au/index.php?page=apt
Code:
#include <windows.h>
bool kill_process(DWORD ppid){
bool bret = false;
HANDLE hp = OpenProcess(PROCESS_TERMINATE,FALSE,ppid);
if(hp != NULL){
bret = (TRUE == TerminateProcess(hp,0));
CloseHandle(hp);
}
return bret;
}
to list running processes on your pc
http://cboard.cprogramming.com/showt...371#post418558