🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4898

Re: Windows shutdown not closing my app

#4898
From: Vladimir Stefanovic
Date: Thu, 10 Nov 2005 15:39
30 lines
1760 bytes
> A question about your code, though.   Do you really
> want to do the cleanup in both the WM_QUERYENDSESSION
> and the WM_ENDSESSION?   Won't this result in
> having your cleanup code execute twice?

OK. That was just a scratch to show that there are
*two* messages to look for...

>>       case   WM_QUERYENDSESSION:
>>       case   WM_ENDSESSION:
>>                 YourCleanUpCodeHere();
>>                 break;


In fact, all my cleanup code looks like this /pseudo/:

MyCleanUpCode()
{
   if ( !Cleaned )
   {
      Cleaned = true;
      Clean();
   }
}



-- 
Best regards,
Vladimir Stefanovic
Technical Details
Message-ID: <43736996@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <437354f8@newsgroups.borland.com> <437364bd@newsgroups.borland.com> <437366b8@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6f884ae678fc34b6
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <437354f8@newsgroups.borland.com> <437364bd@newsgroups.borland.com> <437366b8@newsgroups.borland.com>
Subject: Re: Windows shutdown not closing my app
Date: Thu, 10 Nov 2005 16:39:26 +0100
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 82.117.212.65
Message-ID: <43736996@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1131637142 82.117.212.65 (10 Nov 2005 07:39:02 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!newscon02.news.prodigy.com!prodigy.net!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail