PC Review


Reply
Thread Tools Rate Thread

Shutdown / Logout aborts when closing application

 
 
Robert
Guest
Posts: n/a
 
      29th Mar 2004
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



 
Reply With Quote
 
 
 
 
John Phillips
Guest
Posts: n/a
 
      29th Mar 2004
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.


--
John Phillips
MVP - Windows SDK



"Robert" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>



 
Reply With Quote
 
Robert
Guest
Posts: n/a
 
      30th Mar 2004
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

"John Phillips" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>
> --
> John Phillips
> MVP - Windows SDK
>
>
>
> "Robert" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shutdown, hibernate, sleep, logout, automatic logout. Katit Microsoft C# .NET 1 23rd Aug 2007 08:49 PM
Excel 2002 aborts randomly when closing/saving workbook Barbara Ryan Microsoft Excel Programming 0 19th Jul 2006 03:35 PM
Service containing managed code aborts on logout from console =?Utf-8?B?U3RldmUgQ3Jvc3NsZXk=?= Microsoft Dot NET Framework 0 24th Feb 2005 09:07 PM
Closing all dialogs on logout Joshua T. Moore Microsoft Dot NET Compact Framework 2 24th Feb 2005 03:54 PM
Form Closing fires textbox Validation and aborts close Erik Jensen Microsoft Dot NET Framework Forms 5 14th Aug 2003 02:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:56 PM.