You will find below 4 different techniques to close/kill/terminate Windows process in pure WinAPI.
Techniques
TerminateProcess()
: Classic method.ExitProcess()
: via Code Injection (32bit to 32bit ; 64bit to 64bit).Crash Process
: Inject code that will crash the process (32bit to 32bit ; 64bit to 64bit).CTRL_CLOSE_EVENT
/WM_CLOSE
: Send "close" messages to target process windows.
TerminateAProcess()
Method
Kill target process id following desired method : tmpAll
, tpmTerminateProcess
, tpmExitProcess
, tpmCrash
, tpmMessage
tmpAll
attempt to kill process from cleanest way to dirtiest way until it succeed.