From: SMTP%"Steve_Weinrich@keyvision.com" 17-OCT-1997 17:18:53.13 To: "'Prasad S. Dabak'" , Paul Bunn CC: ntdev@atria.com Subj: RE: WM_QUERYENDSESSION ... Return-Path: owner-ntdev@atria.com Received: by arisia.gce.com (UCX V4.1-12C, OpenVMS V7.1 VAX); Fri, 17 Oct 1997 17:18:10 -0400 Received: from gw.atria.com (gw.atria.com [192.88.237.2]) by bort.mv.net (8.8.5/mem-951016) with SMTP id BAA08152 for ; Fri, 17 Oct 1997 01:09:06 -0400 (EDT) Received: by gw.atria.com id Thu, 16 Oct 1997 19:59:37 -0400 Received: from cip-server.cipartners.com by gw.atria.com id Thu, 16 Oct 1997 19:59:35 -0400 Received: by cip.cipartners.com with Internet Mail Service (5.0.1458.49) id <40H273XR>; Thu, 16 Oct 1997 19:59:08 -0400 Message-ID: From: Steve Weinrich To: "'Prasad S. Dabak'" , Paul Bunn Cc: ntdev@atria.com Subject: RE: WM_QUERYENDSESSION ... Date: Thu, 16 Oct 1997 19:59:07 -0400 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain Sender: owner-ntdev@atria.com Precedence: bulk Try: BOOL CMainFrame::OnQueryEndSession() { if (!CFrameWnd::OnQueryEndSession()) return FALSE; return TRUE; } void CMainFrame::OnEndSession(BOOL bLoggingOff) { CString trace; CFile f("KVTRACE.log", CFile::modeCreate|CFile::modeWrite); if (!bLoggingOff) { trace.Format("Our program has been asked to shutdown: bLoggingOff = %d", (DWORD)bLoggingOff); f.Write((LPCTSTR)trace, trace.GetLength()); f.Close(); } else { trace.Format("Someone is logging off: bLoggingOff = %d", (DWORD)bLoggingOff); f.Write((LPCTSTR)trace, trace.GetLength()); f.Close(); } return; } > -----Original Message----- > From: Prasad S. Dabak [SMTP:prasad@ns2.cybermedia.com] > Sent: Thursday, October 16, 1997 2:30 PM > To: Paul Bunn > Cc: ntdev@atria.com > Subject: RE: WM_QUERYENDSESSION ... > > Hello, > > The problem is evenif you shutdown you get lParam as END_SESSIONLOGOFF > in WM_QUERYENDSESSION message. > > -Prasad > > > On Thu, 16 Oct 1997, Paul Bunn wrote: > > > I assume that lParam==END_SESSIONLOGOFF then this is a logoff > operation > > otherwise it is a shutdown. > > > > Regards, > > Paul Bunn, BEI, 425-644-6000 > > Microsoft MVP - WindowsNT > > http://www.ultrabac.com > > > > > > > -----Original Message----- > > > From: Prasad S. Dabak [SMTP:prasad@ns2.cybermedia.com] > > > Sent: Thursday, October 16, 1997 10:29 > > > To: Paul Bunn > > > Cc: ntdev@atria.com > > > Subject: RE: WM_QUERYENDSESSION ... > > > > > > Hello, > > > > > > Thanks for the reply. > > > > > > Anyway still there is one problem. In WM_QUERYENDSESSION I can > > > not know whether the message is as a result of logoff or shutdown. > > > Because only supported value for lparam for this message is > > > END_SESSIONLOGOFF. Hence I can not distingish between logoff and > > > shutdown. Therefore I can not issue an apporpriate ExitWindows > > > call. I am talking about Windows NT 4.0. > > > > > > -Prasad > > > > > > On Wed, 15 Oct 1997, Paul Bunn wrote: > > > > > > > Post a message for processing (or start another thread). Return > > > FALSE to > > > > WM_QUERYENDSESSION. In your routine which gets executed display > a > > > > dialog box that shows progress, and make sure that the user > knows > > > that a > > > > logoff/shutdown (as appropriate) is pending. Once this is > complete, > > > > issue the correct ExitWindows call and exit your app. > > > > > > > > Regards, > > > > Paul Bunn, BEI, 425-644-6000 > > > > Microsoft MVP - WindowsNT > > > > http://www.ultrabac.com > > > > > > > > > > > > > -----Original Message----- > > > > > From: Prasad S. Dabak [SMTP:prasad@ns2.cybermedia.com] > > > > > Sent: Wednesday, October 15, 1997 15:53 > > > > > To: ntdev@atria.com > > > > > Subject: WM_QUERYENDSESSION ... > > > > > > > > > > Hello, > > > > > > > > > > Anybody have a idea about how to get more time > > > > > during processing of a WM_QUERYENDSESSION message > > > > > under Windows NT 4.0. > > > > > > > > > > By default, if the application does not respond > > > > > within a specific period, Windows pops up a message > > > > > with "Wait", "End Task", "Cancel" button. I want > > > > > to avoid this message to pop up. I want that Windows > > > > > should wait till my work in QUERYENDSESSION is complete. > > > > > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > [ To unsubscribe, send email to ntdev-request@atria.com with body > UNSUBSCRIBE (the subject is ignored). ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntdev-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]