Exit WinForm app with an exit code

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Anthony Hughes (ahughes_at_NOSPAMrm.com)
Date: 10/21/04


Date: Thu, 21 Oct 2004 14:57:24 GMT

Hi All,

I've got a Windows Forms app that I want to return an error code to the caller
- it's a utility in a larger build process and I need to aboort the build if
the utility fails.

I've tried Environment.Exit(<code>) but I only ever get 0x00 returned for any
number tried. Can't see any other way of doing this - surely it must be
possible somehow?

Cheers
Anthony



Relevant Pages

  • Re: which memory address space?
    ... > fails if the EXE gets inaccessible while the app is running. ... This depends on the windows version and service pack, ... an external exception with the error code for "In page error". ...
    (comp.lang.pascal.delphi.misc)
  • RE: Error Code: 8: 0x80004005
    ... I guess that error code was 0x80004005, ... Click services from the tab, check the check box of Hide All Microsoft ... This problem may occur if a file that the Windows Product ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)
  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)
  • HELP ERROR
    ... 940 printer error code 50c help ... certificate errors internet explorer help ... computer help error message on startup ... help for microsoft windows errors ...
    (sci.geo.fluids)