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...
Re: Delay Windows shutdown
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.