Article View: borland.public.cppbuilder.deployment
Article #278Re: Application->Terminate(); Don't stop de application???
From: hans galema
Date: Wed, 17 Nov 2004 10:54
Date: Wed, 17 Nov 2004 10:54
36 lines
1965 bytes
1965 bytes
Halfo wrote:
> I try using:
>
> Application->Terminate();
>
> but the aplication don't stop at this moment an execute the following
> code for some time (causing errors).
>
> Do I can't use Terminate() before call Application->Run(); ????
Think so.
> How can i performe this exit?
Create your modDB dynamic. And use a bool to indicate that the application
should run.
Someting like:
bool startapplication = true;
modDB = new TmodDB (NULL );
// make it in such a way that TModDB can
// set startapplication. This is possible by adding
// an extra parameter or making the bool global.
if ( startapplication )
{
Application->Initialize();
Application->CreateForm(__classid(TwndMain), &wndMain);
Application->Run();
}
Hans.
Technical Details
Message-ID:
<419b2df0$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!news.cambrium.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<419ab390$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f8e54,8dc33e694abddc73 X-Google-Attributes: gidf8e54,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 17 Nov 2004 11:54:41 +0100 From: hans galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.deployment Subject: Re: Application->Terminate(); Don't stop de application??? References: <419ab390$1@newsgroups.borland.com> In-Reply-To: <419ab390$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <419b2df0$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1100688880 129.125.201.248 (17 Nov 2004 02:54:40 -0700) Lines: 36 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!news.cambrium.nl!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail