Halt Procedure
Halt
terminates an application immediately,
without giving it time to clean up after itself. Windows NT
automatically releases any resources that the application was using,
but Windows 95 and Windows 98 are less forgiving. Do not use
Halt
except in unusual circumstances, such as part
of a last-ditch, catch-all exception
handler.
Halt
is not a real procedure.
Halt
saves its argument in the global
ExitCode
variable.
If the ErrorAddr
variable is not
nil
, Halt
prints an error
message before it terminates the program.
The ExitProc
procedure and units’
finalization sections get to run before the program terminates.
Halt
shuts down the program without freeing all
objects and forms. A GUI application should close the main form to
terminate the application instead of calling Halt
.