🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: My app closes, but cancels Windows shutdown?

#2391
From: Bob Gonder
Date: Fri, 09 Mar 2007 19:36
18 lines
1932 bytes
A Nonymous wrote:

>I need to do the terminate in the WM_QUERYENDSESSION because the files 
>are on the net and I need to bypass the normal cleanup code.  When I 
>used to do it in the WM_ENDSESSION sometimes it got runtime errors 
>because other services had been shut down.

That sounds like a good idea, but.....Apparently there is no guarantee
that WM_QUERYENDSESSION will even be sent.....

{MSDN} http://msdn2.microsoft.com/en-us/library/aa376876.aspx
To force all applications to terminate, use ExitWindowsEx, and specify
the EXW_FORCE flag. This prevents the system from sending
WM_QUERYENDSESSION messages.

Apparently this only sends the WM_ENDSESSION message, which is why
everyone is telling you to do the save in that handler rather than the
Querry.
Technical Details
Message-ID: <cs73v21m646sgie33cj3aod4n61cojcutk@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.motzarella.org!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <Xns98ED90968E734anonymoushotmailcom@207.105.83.66> <45f07307@newsgroups.borland.com> <Xns98ED988E421A8anonymoushotmailcom@207.105.83.66> <45f08f8f$1@newsgroups.borland.com> <Xns98EDAC20DAA4Eanonymoushotmailcom@207.105.83.66>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,346f60f70c29a156
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: My app closes, but cancels Windows shutdown?
Date: Fri, 09 Mar 2007 11:36:51 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <cs73v21m646sgie33cj3aod4n61cojcutk@4ax.com>
References: <Xns98ED90968E734anonymoushotmailcom@207.105.83.66> <45f07307@newsgroups.borland.com> <Xns98ED988E421A8anonymoushotmailcom@207.105.83.66> <45f08f8f$1@newsgroups.borland.com> <Xns98EDAC20DAA4Eanonymoushotmailcom@207.105.83.66>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.147.65
X-Trace: newsgroups.borland.com 1173468978 67.77.147.65 (9 Mar 2007 11:36:18 -0800)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.motzarella.org!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail