Article View: borland.public.cppbuilder.nativeapi
Article #15998Re: log off/ application terminate
From: Remy Lebeau (TeamB)
Date: Tue, 03 Jun 2003 18:38
Date: Tue, 03 Jun 2003 18:38
38 lines
2785 bytes
2785 bytes
"Duane Hebert" <duane@nitrex.com> wrote in message news:3edcdbb6@newsgroups.borland.com... > when the application terminates, in the dtor of the > main form we kill the watchdog. When there is a > log off, it doesn't seem like application->terminate() > is called It is not. However, your form's destructor should still execute properly. All Application->Terminate() does is calls PostQuitMessage() which posts a WM_QUIT message to the message queue, nothing else. There are other system messages associated with system logoff/shutdown that the VCL does respond to as well, so it can still clean up after itself properly. > I would also like to know if there is some scheme > to make an app run as a service, even though it's > a GUI app. Not natively, no. Service applications have additional requirements that they must perform during startup. You can't simply turn a GUI app into a service, services are a completely different beast. That is why there is a separate "Service Application" wizard when you go into the IDE's "File | New" dialog. There is, however, a Microsoft utility called SRVANY that can run applications under the context of a service, but I do not recommend it for GUI apps, it is geared towards console apps instead, as services are not GUI apps to begin with. > This is actually a control application and it > needs to run without interruption if possible. Then I suggest you re-write the core of the application into a true non-GUI service app, and then move just the GUI portions into a separate app that can communicate with the core service via IPC (inter-process communication, such as TCP/IP sockets, named pipes, RPC, etc.) when needed. Gambit
Technical Details
Message-ID:
<3edcea6f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3edccd80@newsgroups.borland.com> <3edcd422$1@newsgroups.borland.com> <3edcdbb6@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,f4b8abe1a2fab575 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-03 11:41:13 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3edccd80@newsgroups.borland.com> <3edcd422$1@newsgroups.borland.com> <3edcdbb6@newsgroups.borland.com> Subject: Re: log off/ application terminate Date: Tue, 3 Jun 2003 11:38:29 -0700 Lines: 40 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: 207.175.226.26 Message-ID: <3edcea6f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054665327 207.175.226.26 (3 Jun 2003 11:35:27 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail