Click to See Complete Forum and Search --> : Exiting NT session


agalkin
April 12th, 1999, 01:59 PM
I have multithreaded application with several UI thread and several worker threads. The application fails to exit when Windows NT session is exiting. I check WM_QUERYENDSESSION and WM_ENDSESSION are sent to all top-level windows and return values are correct. NT waits for the application to exit and then displays dialog box "application is not responding". Everything works fine and the application successfully exits when running on Windows 9x. Also normally it exits well on either platform. Unfortunately, I cannot set breakpoint in WM_QUERYENDSESSION and WM_ENDSESSION messages handlers when Windows is exiting.
Does anyone have any idea?

Gomez Addams
April 12th, 1999, 04:04 PM
I don't have an idea about your problem but I do have one about trying to debug it.
Try writing a little app that will emulate windoze and fire those session messages
into your app. That way you can keep your session running and debug your app's
handling of those messages.

April 12th, 1999, 05:16 PM
I don't think I can emulate exiting Windows session as I personally don't know what actions and in which sequence Windows makes when it is about to exit.

Gomez Addams
April 12th, 1999, 06:22 PM
Try using Spy++ and monitor messages to and from your app.
You can set the output to log to a file and then look at the file
after you have restarted your session.