| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | WinCancelShutdown |
Ok, here seems to be the definitive poop on WinCancelShutdown...
1) There are three methods to get one
a) You send one to yourself
b) You get one from the task list or from the frame's system menu
c) You get one during a normal shutdown via the desktop
2) Here is how you can tell which you got
a) Shutdown - (qMsg.hwnd == NULLHANDLE)
b) Tasklist - (qMsg.hwnd != NULLHANDLE)
&& (qMsg.hwnd == HWNDFROMMP(mp2))
c) Appl - (qMsg.hwnd != NULLHANDLE)
&& (mp1 == mp2) && (mp1 == 0L)
I got this from an IBM guy on Compuserve. I think that c) is kind of
redundant, since mp1 must be 0. That means that (mp1 == mp2) could be
gotten away from and just say (!mp1 && !mp2) or something like that.
3) Only the system shutdown is the problem. The other two work as my
investigation had indicated. For those, the thread whose frame was
involved will get the WM_QUIT so that is never a problem.
4) The system shutdown is where the system will kind of pick a queue,
any queue. If that thread does not respond by terminating the app, then
evidently the system shutdown will hang. And I think we have all seen
that happen at one time or another.
5) The version of WinCancelShutdown(, TRUE) that tells PM never to
post a WM_QUIT, is intended for the system shutdown scenario, not for
the other two. And, unlike the other two, it can be called immediately
after the queue is created. So you just need to make sure that all
theads except the main one that is processing the message loop call
that version immediately after creating the message queue.
6) The WinCancelShutdown(,FALSE) version is for actually cancelling a
shutdown and must be called after receiving a WM_QUIT.
Thats it as far as I can tell.
___
X KWQ/2 1.2b X Look Ma, I'm a *Beta Tester*: KWQ Mail/2 for OS/2 v2.0!
--- Maximus/2 2.02
* Origin: Fernwood - your source for OS/2 files! (1:141/209)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1 @PATH: 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.