|
-
February 15th, 2008, 11:06 AM
#1
Delay Windows shutdown
I have a Windows service in which I need to detect the Windows shutdown event and, depending on what kind of processing I am doing at the time, delay the shutdown for a few seconds until my processing is complete. Can that be done?
Any help appreciated.
-
February 15th, 2008, 11:18 AM
#2
Re: Delay Windows shutdown
I'm not a hundred percent sure but I think I recall a message(maybe WM_SYSCOMMAND) that returns a value in wParam that tells you that windows is shutting down... And if you return false it won't...
Just sayin' but I'm 14(I'm telling you this so you know what sort of language to use).
Advice received by a user.
-
February 16th, 2008, 10:34 AM
#3
Re: Delay Windows shutdown
-
February 19th, 2008, 11:02 AM
#4
Re: Delay Windows shutdown
Thanks everyone for the help. I know about the WM_QUERYENDSESSION message and how to handle it. Originally, I was looking for a way to get around the hidden window in my service, but because I have to interact with my user, I must use it. I found that the AbortShutdown() API function is what I need to use to delay the system shutdown.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|