Reputation: 4135
I have an application which when I close the Windows, it exits gracefully and quickly (checked also in Task Manager and Process Explorer - the process isn't there anymore) but the OS doesn't. It seems that OS just ignores the Shutdown.
But if I try to close once more the Windows, now everything is ok. The system shuts down in a very normal way.
Details about my app:
Any ideas how to fix it?
PS: I'm at your disposition with and further details upon request
Upvotes: 3
Views: 391
Reputation: 58431
Strange but almost exactly the same problem bugged us this week.
The application ran in the tray, closed but prevented windows from shutting down. So having been there, I'll share what fixed the problem for us.
In the end, we choose to just remove the NMsmtp component for wich we didn't have the source code and changed to using Indy.
Most likely, your situation will differ therefore I'd suggest you do like we did and start stripping everything from you project until it works.
Upvotes: 1
Reputation: 31
If the application still doing work on the background this could be prevent Windows to shutdown.
You could check if the AutoEndTasks settings are enabled and enabled it if not :
http://technet.microsoft.com/en-us/library/cc978604.aspx
Best Regards
Upvotes: 0
Reputation: 78155
Do you indeed return TRUE to the WM_QUERYENDSESSION (or similar) OS messages? You might get the message, close the app and return FALSE.
Upvotes: 1