| You can return exit code in delphi by following method: var
i : Integer;
begin
// Set up an error address so that halt shows a termination dialog
ErrorAddr := Addr(i);
// Set the program exit code
ExitCode := 8;
end;
As you can see above, you can set exit code by ExitCode variable. That is global variable indicating exit code. |