emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exit hooks not run at logout on w32


From: Jason Rumney
Subject: Re: Exit hooks not run at logout on w32
Date: Tue, 04 Jul 2006 09:49:54 +0100
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

Mathias Dahl wrote:
    Applications with a window and message queue receive shutdown
    notifications through the WM_QUERYENDSESSION message. These
    applications should perform any required cleanup while processing
    this message and return TRUE to indicate that they can be
terminated.

So, I conclude that displaying a dialog box ("Do you want to save bla
bla?") would violate the "rules" above, wouldn't they?

That was my same conclusion, based on reading the documentation of the actual system messages. But it is interesting that the advice above contradicts the advice in the documentation for WM_QUERYENDSESSION, which says you should NOT perform cleanup while processing that message, but save it for WM_ENDSESSION. I think the contradictions in Microsoft's documentation about shutdown are what is causing the confusion here. Lennart posted another contradiction, where in the documentation for InitiateSystemShutdown, there is advice that applications can delay shutdown if they have unsaved data if a particular flag is passed. But that advice is for users of InitiateSystemShutdown, not for recipients of the shutdown messages, so my opinion is that it is informing of worst case expectations for code that wants to shut the system down (assuming that not all applications will take the advice elsewhere - apparently some of Microsoft's own products do not).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]