|
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
1. WM_QUERYENDSESSION #12145 Posted by: mestrini 2007-12-07 19:03:55 Last edited by: mestrini 2007-12-07 19:15:08 (Total edited 1 time) |
I'm trying to catch the system shutdown messages in order to stop it, perform some action and the shut down by myself but i'm getting pretty much confused with WindowProc Function and all that is associated. I believe that reginald is already doing it since it catches the WM_xxx messages sent to the script window. Any ideas on how to accomplish it?
tx
EDIT: SORRY, i should have looked at the main script window events because it's already implemented...
please delete, tx |
2. #12146 |
hmm, i can't seem to get it to work; system proceeds to Shut Down no matter what...
help says i should return an empty string to prevent WM_ENDSESSION to be started but i can't get it.
help please... tx |
3. #12217 |
Bump...
Any thoughts,examples Jeff... anyone?
tx |
4. Sorry - not a sort of thing I'd want to experiment with #12218 |
what with my machine shutting down all the time as a result. |
5. #12223 |
I've never used WM_QUERYENDSESSION, so I'm not sure how it works. Have you tried doing aRETURN 0 ... to see if that makes a difference? |
6. Re: #12224 |
I've never used WM_QUERYENDSESSION, so I'm not sure how it works. Have you tried doing aRETURN 0 ... to see if that makes a difference? Does just the same. Windows proceeds to shutdown/logoff :( |
7. #12225 |
Are you using Vista or XP? The behavior is different between those OS'es.
http://msdn2.microsoft.com/en-us/library/ms700677.aspx
Also, you are in fact getting the QUERYENDSESSION event? It has to be handled by your main window (which has no parent). |
8. #12226 |
I'm running XP and my script has no child windows. In fact the main window is hidden and the user interacts with an icon resting on the systray.
I'm not getting the QUERYENDSESSION event at all. |
9. #12228 |
Ah. That could be the problem then. The operating system sends the message only to the main window, and not a hidden one either. |
10. #12229 |
Even showing the main window i get no event. But shouldn't a hidden window get the system's message? It still has a handle that can catch signals, i think.
Maybe i'm doing it wrong. You think you can find time to scribble an example?
tx |
11. #12231 |
Ok, the most i can achieve is a small delay in logging off and explorer.exe being forced by windows to close. Can it be that the script replies correctly to the OS but rxlaunch.exe proceeds to shutdown? |
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |