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
Identifies the process to terminate.
Windows NT: The handle must have PROCESS_TERMINATE access. For more information, see Process Objects(in Windows SDK Help).
Specifies the exit code for the process and for all threads terminated as a result of this call. Use the GetExitCodeProcess function to retrieve the process's exit value. Use the GetExitCodeThread function to retrieve a thread's exit value.
Create a new VCL application, add a button, double-click that button and copy-paste
procedure TForm1.Button1Click(Sender: TObject); begin TerminateProcess(GetCurrentProcess, 0); end;Your application should terminate instantly.