Article View: borland.public.cppbuilder.nativeapi
Article #13124Re: Returning ERRORLEVEL
From: Remy Lebeau (TeamB)
Date: Tue, 28 Oct 2003 03:22
Date: Tue, 28 Oct 2003 03:22
26 lines
1956 bytes
1956 bytes
"Fishface" <invalid@ddress.ok?> wrote in message news:3f9dddd2@newsgroups.borland.com... > the exit(5) worked when I just tested it from a VCL GUI app. Which you should not be doing to begin with. The exit() function is dangerous to call from a GUI process, especially one that uses the VCL. It does not clean everything up correctly. > I guess you mean to modify the project's .cpp source to return > the value from WinMain(). Yes. That is the only safe way to return a value in a GUI process, except for maybe ExitProcess(), which, if I remember correctly, is actually called automatically by the project's startup code passing it the return value of WinMain(). > For some reason, I was thinking that was a dummy function and > the real WinMain() was buried in the VCL somewhere, Nope. What you see in the main project file is the real WinMain() for the project. Gambit
Technical Details
Message-ID:
<3f9de046$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f9d9ab0@newsgroups.borland.com> <3f9dd481@newsgroups.borland.com> <3f9dd8f9$1@newsgroups.borland.com> <3f9dddd2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,6211acfb31792 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-27 19:39:14 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3f9d9ab0@newsgroups.borland.com> <3f9dd481@newsgroups.borland.com> <3f9dd8f9$1@newsgroups.borland.com> <3f9dddd2@newsgroups.borland.com> Subject: Re: Returning ERRORLEVEL Date: Mon, 27 Oct 2003 19:22:18 -0800 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.137.75 Message-ID: <3f9de046$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067311174 67.22.137.75 (27 Oct 2003 19:19:34 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail