--- ---
If at any point you wish to terminate a process instantly then you should take a look at the TerminateProcess function in Windows SDK (Software Developer Kit) help which comes with Delphi.
TerminateProcess function is defined as
BOOL TerminateProcess( HANDLE hProcess, // handle to the process UINT uExitCode // exit code for the process );
Parameters information according to Delphi Help
Create a new VCL application, add a button, double-click that button and add the following code:
procedure TForm1.Button1Click(Sender: TObject); begin TerminateProcess(GetCurrentProcess, 0); end;
Your application should terminate instantly.