//Here you go, thanks go to (Saar)tornado@goblineye.com for helping! HWND hWnd = FindWindow(...); // Get the HANDLE to window you want to kill.
DWORD pid = 0; GetWindowThreadProcessId(hWnd, &pid); HANDLE hpro = OpenProcess(PROCESS_ALL_ACCESS, 1, pid); TerminateProcess(hpro, 0); |