1 2 3 4 5 6 7 8 9 10
#include <windows.h> void terminatepid (DWORD pid) { HANDLE h; h = OpenProcess(PROCESS_TERMINATE, 0, pid); if (h != NULL) { TerminateProcess(h, 1); } CloseHandle(h); }