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 并取得其执行结果
...全文
82 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.
Borland Delphi 2005 Architect Update 3----------Report #: Short Description: Rating: Status12241 IntToHex returns lowercase letters0.00 of 5 Closed11881 TStringStream constructor for .NET sets Position incorrectly0.00 of 5 Closed11787 Access violation using Code Insight when editing the uses clause0.00 of 5 Closed11759 TList instance leaked in DBCommon.pas when using IN operator in Filter expression5.00 of 5 Closed11651 New EllipsisPosition property causes text to be invisible & process to hang5.00 of 5 Closed11471 Cannot manage StarTeam association since applying Update20.00 of 5 Closed11353 (strict) protected nested class become public3.67 of 5 Closed11314 Too much inlining yields unstable compiled code.0.00 of 5 Closed11266 Inline causes compile error : F2084 Internal Error SCR765.00 of 5 Closed11193 Inlined function affects working of the enclosing for loop0.00 of 5 Closed11184 [Fatal Error] F2084 Internal Error: ILLK26340.00 of 5 Closed11069 Compact the TApplication.ProcessMessage code fragment for Unicode handling5.00 of 5 Closed10918 TColorBox control custom color selection causes AV0.00 of 5 Closed10873 Internal error: URW 793 when using constant struct with enums2.00 of 5 Closed10861 Access Violation when compiling code with default index property0.00 of 5 Closed10772 Designer improperly handles controls tagged with [ToolboxItem]0.00 of 5 Closed10669 TWideStrings has no GetEnumerator method0.00 of 5 Closed10661 Switching between form and source view cause long delay4.67 of 5 Closed10567 Ability to create all VCL packages0.00 of 5 Closed10498 D2005: DataSet lots of methods missing in code completion0.00 of 5 Closed10450 The Ellipse is drawn over some of the caption text when a form is docked in IDE0.00 of 5 Closed10381 Constant array of procedural types crashes compiler5.00 of 5 Closed10376 The Delphi 2k5 IDE UpTime & project loading is very SLOW4.00 of 5 Closed10314 Error Insight fails to flag an error4.00 of 5 Closed10248 Alignment Palette in VCL form designer malfunctions5.00 of 5 Closed10190 List view selected item no longer selected5.00 of 5 Closed10009 Double-click in the Search Results window0.00 of 5 Closed9912 Press Enter on Component crashes Delphi 20050.00 of 5 Closed9847 Transactional Object Wizard Missing0.00 of 5 Closed9712 The XML documentation feature doesn't associate comments with the correct symbols5.00 of 5 Closed9690 "Cannot focus a disabled or invisible window" in IDE0.00 of 5 Closed9666 Code Completion doesn't show all available items when using overload5.00 of 5 Closed9639 Active Form wizard not available in Delphi 2005 but mentioned in online help5.00 of 5 Closed9634 IDE response too SLOW4.63 of 5 Closed9578 TXPManifest + TFrame + TLabel + TRadioGroup = bad5.00 of 5 Closed9477 Delphi .NET assembly references with strong names5.00 of 5 Closed9254 Incorrect reference public key token included into Delphi8 strong-named assembly metadata4.00 of 5 Closed9021 Memory Leak in TreeView0.00 of 5 Closed8866 Assigning long string values (greater than 8192 characters) to TStringFields results in access violation.5.00 of 5 Closed8785 Filter or Ranges on Nested Dataset's should restrict master as well.0.00 of 5 Closed8417 TCustomSQLDataSet.GetFieldData implementation0.00 of 5 Closed8229 Error in code when database doesn't support schema/owner names5.00 of 5 Closed8032 Show modified code in the scrollbar0.00 of 5 Closed8021 TIndexDef.Assign Doesn't copy DescFiels and CaseInsFields5.00 of 5 Closed8001 SQLDataset doesn't call .Close on dbExpress driver cursor when closing5.00 of 5 Closed7912 TCustomClientdataset: properties "IndexDefs" and "IndexName" should be public0.00 of 5 Closed7872 double exception in method TDataSetProvider.InternalGetRecords5.00 of 5 Closed7809 SetOptionalParam don't work0.00 of 5 Closed7768 An Easy Feature Request: TDataset.CopyFields4.00 of 5 Closed7290 Grid's functionality enhancement5.00 of 5 Closed7199 Class Completion erroneously adds fields to a complete class if the getter functions starts with F5.00 of 5 Closed7082 Add SSE3 / PNI instructions to the BASM5.00 of 5 Closed7005 New control request - TDBStaticText - Add possibility to have Edge Borders0.00 of 5 Closed6985 Add node for unit name in Find in Files results in Message Window0.00 of 5 Closed6803 WebToolBar problem with buttons0.00 of 5 Closed6558 AV in DBGrid when destroying DataSet0.00 of 5 Closed6428 Labels disappear with XPManifest5.00 of 5 Closed6368 Resolving lookup- & calculated fields to datafields4.00 of 5 Closed6238 DBNavigator and DBGrid compliant with Federal Section 5080.00 of 5 Closed6021 Labels not visible in Windows XP0.00 of 5 Closed5951 Internal error: SY5764.44 of 5 Closed5812 TComboBox.Focused method does not always return good results.1.00 of 5 Closed5803 Unable to delete component if code editor minimized in saved desktop5.00 of 5 Closed5763 Cannot debug datamodule containing many objects0.00 of 5 Closed5699 Apache shared modules do not work with Apache 2.0.4x5.00 of 5 Closed5592 New event OnValidate that is fired before applying updates2.00 of 5 Closed5336 fatal error: Internal Error: L6812.33 of 5 Closed5283 Cannot read complete compiler error message.0.00 of 5 Closed5280 MessageDlg returns mrNone instead of mrCancel when aborted5.00 of 5 Closed5248 Assert fails to break and leaves FPU invalid op exception set.4.50 of 5 Closed4627 Cannot assign -2147483648 into INTEGER Variable4.00 of 5 Closed4624 A way to set both Width and Height of TBitmap (speed reason)4.85 of 5 Closed4581 Field description and Label3.00 of 5 Closed4444 IncMilliSeconds...IncHour with DateTime<0 wrong0.00 of 5 Closed4343 Proposal of modification of the TDataSet.Post method in DB.pas unit1.00 of 5 Closed4184 Delphi DLL using sharemem called from VC++ exe AV on exit3.25 of 5 Closed4172 tFrames and XPMan hiding controls5.00 of 5 Closed3850 TGraphicControl descendants invisible in frames with XP Manifest4.60 of 5 Closed3792 TryEncodeDateTime not correct for dates before Dec. 30, 18995.00 of 5 Closed3776 Add full IDL support0.00 of 5 Closed3718 Automatic Required setting of TField not consistent with SQL3.71 of 5 Closed3542 Strange limits in property CommandText2.40 of 5 Closed2881 DBGrid doesn't repaint when Enabled changed.5.00 of 5 Closed2625 Impossible to open a .TLB into the TLB Editor if missing uses reference3.50 of 5 Closed2608 Compiler crashes, dcc70.dll Read of address 000000004.00 of 5 Closed2572 Unable to sort on columns in module view3.00 of 5 Closed2382 TListView doesn't update correctly in OwnerData mode.4.00 of 5 Closed2276 'deprecated' warning appears when it shouldn't4.31 of 5 Closed2258 Failure to parse/compile integer constant --2147483648 and lower4.86 of 5 Closed2236 Delphi converts Text DFM's to binary with these steps4.71 of 5 Closed1685 Compiler error message refers to HIGH when it should be LOW3.43 of 5 Closed1455 GetRange method3.38 of 5 Closed1209 Context help does not work for TComboboxEx3.67 of 5 Closed1177 ResourceString limitation of 1024 characters3.89 of 5 Closed(出处:www.borland.com)
RX Library 2.75 with Delphi 2009 support (by FlexGraphics software) ====================================================================== The Set of Native Delphi Components for Borland Delphi versions 1, 2, 3, 4, 5, 6, 7, 2005, 2006, 2009 and Borland C++ Builder 1, 3, 4, 5, 6, 2006 & 2009. 100% Source Code. Last revision date Oct 12, 1999. PLEASE FOLLOW THE INSTRUCTIONS PROVIDED IN THE INSTALLATION SECTION! TABLE OF CONTENTS ----------------- Latest Changes Overview History License Agreement Installation Demonstration Programs Source Files Using GIF Images Copyright Notes NEW FOR VERSION 2.75 -------------------- Delphi 5.0 & C++Builder 4.0 Compatibility New components: TRxLoginDialog New properties, events: TFormPlacement.RegistryRoot TFormPlacement.Version TFontComboBox.UseFonts TRxDBGrid.OnTopLeftChanged TRxDBLookupCombo.DisplayValues TStrHolder.Macros, TStrHolder.OnExpandMacros RxSpin.TValueType.vtHex New routines, methods, constants: SaveClipboardToStream, LoadClipboardFromStream (clipmon.pas) AppFileName, AppVerInfo (rxverinf.pas) XorString, XorEncode, XorDecode (strutils.pas) BUG FIXES. Overview -------- This version is the result of long unactivity of RX Library authors and some imperfections and bugs of other RX adaptations to Delphi 6. The authors of this version disclaim all warranties as to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose. Use under your own responsibility, but comments (even critique) in English (or in Russian) are welcome. RX Library contains a large number of components, objects and routines for Borland Delphi with full source code. This library is compatible with Borland Delphi 1, 2, 3, 4, 5, 6 and Borland C++ Builder 1, 3, 4. This collection includes over 60 native Delphi components. RX Library is a freeware product. Feel free to distribute the library as long as all files are unmodified and kep
RX Library 2.75 =============== The Set of Native Delphi Components for Borland Delphi versions 1, 2, 3, 4 & 5 and Borland C++ Builder 1, 3 & 4. 100% Source Code. Last revision date Oct 12, 1999. PLEASE FOLLOW THE INSTRUCTIONS PROVIDED IN THE INSTALLATION SECTION! TABLE OF CONTENTS ----------------- Latest Changes Overview History License Agreement Installation Demonstration Programs Source Files Using GIF Images Copyright Notes NEW FOR VERSION 2.75 -------------------- Delphi 5.0 & C++Builder 4.0 Compatibility New components: TRxLoginDialog New properties, events: TFormPlacement.RegistryRoot TFormPlacement.Version TFontComboBox.UseFonts TRxDBGrid.OnTopLeftChanged TRxDBLookupCombo.DisplayValues TStrHolder.Macros, TStrHolder.OnExpandMacros RxSpin.TValueType.vtHex New routines, methods, constants: SaveClipboardToStream, LoadClipboardFromStream (clipmon.pas) AppFileName, AppVerInfo (rxverinf.pas) XorString, XorEncode, XorDecode (strutils.pas) BUG FIXES. Overview -------- RX Library contains a large number of components, objects and routines for Borland Delphi with full source code. This library is compatible with Borland Delphi 1, 2, 3, 4, 5 and Borland C++ Builder 1, 3, 4. This collection includes over 60 native Delphi components. RX Library is a freeware product. Feel free to distribute the library as long as all files are unmodified and kept together. The authors disclaim all warranties as to this software, whether express or implied, including without limitation any implied warranties of merchantability or fitness for a particular purpose. Use under your own responsibility, but comments (even critique) in English (or in Russian) are welcome. 1. Components: TRxDBLookupCombo provides an incremental search through lookup list by directly typing into the combo control while the lookup list is displayed, LookupSource can refer to TTable, TQuery, TRxQuery or TQBEQuery. It even incrementally searches on the query results and much more... TRx

5,388

社区成员

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

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