Windows shutdown
-
hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance
-
hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance
rw104 wrote: I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. I believe that should be a 0.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
hello, I want to prevent user shutdown. I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. It works on occassions but crashes on others, it seems to be completely inconsistent too...I know i am cathing the WM_QUERYENDSESSION so its not anything else... Is there something else I need to do??? Thanks in advance
rw104 wrote: I am catching the WM_QUERYENDSESSION message and returning a 1, which occording to the inline help should stop the shutdown process. Hum, I don't get the same info in MSDN: From MSDN, Platform SDK: Windows System Information "Return Values If an application can terminate conveniently, it should return TRUE; otherwise, it should return FALSE. Remarks By default, the DefWindowProc function returns TRUE for this message. Windows NT/2000/XP: When an application returns TRUE for this message, it receives the WM_ENDSESSION message and it is terminated, regardless of how the other applications respond to the WM_QUERYENDSESSION message. Windows 95/98/Me: After all applications return TRUE for this message, they receive the WM_ENDSESSION and they are terminated. " HTH, K.
And I'm talking to myself at night because I can't forget Back and forth through my mind Behind a cigarette