How to get the exit code of TApplication.

wwqbj 2000-07-05 03:30:00
在 C/C++ 中可以用exit(nCode) 或 在main()函数中return 一个值做为Application 的 exit code;
在DELPHI 中有无类似的方法?
我需要在命令行执行一个application 中的 function 并取得其执行结果
...全文
81 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
WHQ 2000-07-05
  • 打赏
  • 举报
回复
GetExitCodeProcess——名字可能不大正确
kxy 2000-07-05
  • 打赏
  • 举报
回复
ExitCode variable
Contains the application's exit code. (provided for backward compatibility)

Unit

System

Category

backward compatibility routines

var ExitCode: Integer;

Description

ExitCode is provided for backwards compatibility only. Use a finalization section instead.

Note

The description of how ExitCode was used follows:

The ExitCode variable contains the application's exit code. An exit procedure can learn the cause of termination by examining ExitCode. If the program terminates normally, ExitCode is zero. If the program terminates due to a call to Halt, ExitCode contains the value passed to Halt. If the program terminates due to a run-time error, ExitCode contains the error code.

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧