🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: WM_ENDSESSION + Win2k/WinXP

#15763
From: Frank Gruber
Date: Wed, 18 Jun 2003 18:33
22 lines
1889 bytes
> of others we saw that at logoff, the OnClose event wasn't firing.  I think
> it had something to do with the
> WM_ENDSESSION  message.  I worked around this by putting everything in the
> OnCloseQuery
> event instead.  Not sure if it's the same problem but it sounds similar...

Not exactly. The WndProc of the TApplication object intercepts the
WM_ENDSESSION
message and sets FTerminate to true so that the message loop is left after
returning from
this message. The problem is that this will never happen because as soon as
you return
from the WM_ENDSESSION Windows will terminate the app. This is the design as
stated in the Windows docs and so the VCL code will never work. But in my
case
the WM_ENDSESSION message handler is interrupted by Windows before it
returns,
and that is a different story.

Thank's for sharing your experiences.
Regards,
Frank.
Technical Details
Message-ID: <3ef0b094@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ef08c31$1@newsgroups.borland.com> <3ef09b02$1@newsgroups.borland.com> <3ef0a332@newsgroups.borland.com> <3ef0a966@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9e00bf1ef85252e4
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-18 11:37:52 PST
From: "Frank Gruber" <HVFDMIPUMFPS@spammotel.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ef08c31$1@newsgroups.borland.com> <3ef09b02$1@newsgroups.borland.com> <3ef0a332@newsgroups.borland.com> <3ef0a966@newsgroups.borland.com>
Subject: Re: WM_ENDSESSION + Win2k/WinXP
Date: Wed, 18 Jun 2003 20:33:17 +0200
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
NNTP-Posting-Host: 217.231.157.82
Message-ID: <3ef0b094@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1055961236 217.231.157.82 (18 Jun 2003 11:33:56 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail