Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exit Windows
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00138616
Message ID:
00138908
Views:
12
>This is why I suggest EWX_FORCE as the terminating parameter. This by-passes the messy situation you describe.

I don't think it does. When you use EWX_FORCE with ExitWindowsEx(), neither WM_QUERYENDSESSION nor WM_ENDSESSION is sent to apps. Windows just terminates them, with extreme prejudice. The SDK documentation says this flag should only be used in an emergency (?!).

>BTW, and for the second time, there is no WM_SHUTDOWN message. It's WM_QUERYENDSESSION that's sent when Windows shuts down

Just a clarification (I'm sure you know this). WM_QUERYENDSESSION is sent before Windows shuts down (except in the above case). Any app can return FALSE from that message, and Windows won't shut down (nor will any apps close). After all apps return TRUE from WM_QUERYENDSESSION, then Windows will send WM_ENDSESSION to all apps and shut down, regardless of whether any app changed its mind in the interim. :)
Previous
Reply
Map
View

Click here to load this message in the networking platform