From: Sarah M. Weinberger on 15 Jun 2010 14:53 Hi, How does one adhere in VB6 to Restart Manager messages. Here is some text that Microsoft provides in the WinQual tests for Win7. Would that be the Form_QueryUnload? If so, am I to just return False there or what is Microsoft expecting? Thanks, Sarah -------------------------------------------------------------------------------------------------------------------------------------------------- Some applications as part of their first launch display EULAs or auto update prompts, registration forms, etc. If your application performs in this way, it could be falsely reported as non-compliant with the restart requirement. If any of the above files are reported for this reason, you should restart testing from a clean state (clean OS). This time around, before running the /postinstall phase, execute any run-once functionality in the application PRIOR to running the /postinstall phase of the toolkit. IMPACT IF NOT FIXED: By failing to shutdown gracefully, customers could lose data when the OS finally forces a shutdown. It also slows the shutdown/reboot process, impacting performance perceptions. HOW TO FIX: In a critical shutdown, applications that return FALSE to WM_QUERYENDSESSION will be sent WM_ENDSESSION and closed, while those that time out in response to WM_QUERYENDSESSION, will be terminated. By following these guidelines, you can ensure that your application will handle critical shutdowns gracefully: WM_QUERYENDSESSION with LPARAM = ENDSESSION_CLOSEAPP(0x1): GUI 19 applications must respond (TRUE) immediately in preparation for a restart WM_ENDSESSION with LPARAM = ENDSESSION_CLOSEAPP(0x1): Applications must return a 0 value within 30 seconds and shut down. At a minimum, applications should prepare by saving any user data and state information that is needed after a restart Console applications that receive CTRL_C_EVENT notification should shut down immediately. Drivers must not veto a system shutdown event More information and guidance on requesting and responding to system shutdowns and the RestartManager is available HERE --------------------------------------------------------------------------------------------------------------------------------------------------
From: Dee Earley on 17 Jun 2010 06:57 On 15/06/2010 19:53, Sarah M. Weinberger wrote: > Hi, > > How does one adhere in VB6 to Restart Manager messages. Here is some > text that Microsoft provides in the WinQual tests for Win7. Would that > be the Form_QueryUnload? If so, am I to just return False there or what > is Microsoft expecting? Yes. Normally you prompt and save in queryunload, cancelling if the user requests it, and then shutdown in the unload. If the user cancels, and it's an important shutdown, it will be terminated. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems (Replies direct to my email address will be ignored. Please reply to the group.)
From: Mayayana on 17 Jun 2010 08:35 Do you know about the possible values of the "cancel" parameter in QueryUnload? 0 The user chose the Close command from the Control menu on the form. 1 The Unload statement is invoked from code. 2 The current Microsoft Windows operating environment session is ending. 3 The Microsoft Windows Task Manager is closing the application. 4 An MDI child form is closing because the MDI form is closing. 5 A form is closing because its owner is closing. # 4 and 5 might need a little extra attention, making sure that you don't put porgram-closing code in sub-windows. But in general it goes something like this: If cancel = 0 then ' ask about saving open files before closing and provide a cancel option. Else ' quit. Either the system or your own code is telling you to close. End If
From: Bob Butler on 17 Jun 2010 10:09 "Mayayana" <mayayana(a)invalid.nospam> wrote in message news:hvd4np$nq3$1(a)news.eternal-september.org... > Do you know about the possible values of the "cancel" The UnloadMode parameter... > parameter in QueryUnload? > > 0 The user chose the Close command from the Control menu on the form. > 1 The Unload statement is invoked from code. > 2 The current Microsoft Windows operating environment session is ending. > 3 The Microsoft Windows Task Manager is closing the application. > 4 An MDI child form is closing because the MDI form is closing. > 5 A form is closing because its owner is closing. > > # 4 and 5 might need a little extra attention, > making sure that you don't put porgram-closing > code in sub-windows. But in general it goes > something like this: > > If cancel = 0 then if unloadmode = 0 then > ' ask about saving open files before closing and provide a cancel > option. > Else > ' quit. Either the system or your own code is telling you to close. > End If > >
From: Mayayana on 17 Jun 2010 10:18 | > Do you know about the possible values of the "cancel" | | The UnloadMode parameter... | Woops. Thanks.
|
Next
|
Last
Pages: 1 2 3 Prev: SetKeyboardState to send Ctrl key combinations Next: Print on two sides |