Shutdown / Logout aborts when closing application

R

Robert

I have encountered a strange behaviour of the windows shutdown / logoff
procedure when any of two specific applications is running at that time.
Although the application terminates, and the process disappears from the
process list, the shutdown will not continue. It will not even complete
terminating all the other programs, in some cases.
Also, the fact that I can then start new programs indicates that the
shutdown was truly aborted.

However, the programs do not use the AbortSystemShutdown API call or
anything like it! So for what reason could the shutdown still be aborted?

All suggestions welcome

Robert
 
J

John Phillips

Could they be returning 0 when processing the WM_QUERYENDSESSION message?
That might stop the shutdown if attempting to shut down Windows internally
calls ExitWindowsEx() with EWX_FORCEIFHUNG.
 
R

Robert

Not directly, but thanks: You gave me the right idea.
Since it's a VB application, there is no way to process WM_QUERYENDSESSION
directly, but I cancelled application termination first, in order to gain
time for a proper application shutdown. So the system thinks that the
application cannot terminate. Sigh...

Thanks again

Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top