Re: Can I delay windows automatically shuting down my app?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Ben Voigt" <rbv@xxxxxxxxxxxxx> wrote in message
news:eZ7YbykOHHA.4724@xxxxxxxxxxxxxxxxxxxxxxx

One solution is to respond immediately to the WM_QUERYENDSESSION by
returning FALSE (abort shutdown), and then initiate the same kind of
shutdown that had already been initiated once the user has responded to
your message (actually, I'm not sure whether you can work out whether it
was a restart or a plain shutdown).

Users *hate* that behavior, they expect that if they click logout and walk
away, the computer will be logged off when they come back.

I hadn't thought about that.
I'll look at the sites.

thanks



Find some reasonable default behavior, like saving all open files with an
alternate name (append .autosave or .leftopen to the filename). Then, if
the user hasn't responded to your prompt by the timeout, execute the
default behavior and quit.

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/34637.mspx?mfr=true

Note that if AutoEndTasks is set you need to give up on waiting for the
user with time to spare for your own processing or I/O, otherwise your app
will be rudely terminated.
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/34637.mspx?mfr=true


I don't know of a way to change the OS delay you mention - there may be a
registry key somewhere for it.

Tom




.



Relevant Pages

  • Re: SBS2003 Shuts down every day
    ... I was going to suggest that someone was shutting it down until I reread your ... initiate scheduled shutdowns, so that would be one thing to check. ... > The process Explorer.EXE has initiated the shutdown of computer SERVER01 ...
    (microsoft.public.backoffice.smallbiz2000)
  • System shutdown initiated...
    ... any unsaved changes will be lost. ... This shutdown was initiated y NT Authority\SYSTEM. ... I did not initiate the shutdown. ... Scan with latest virus ...
    (microsoft.public.security)
  • Re: Can I delay windows automatically shuting down my app?
    ... returning FALSE (abort shutdown), and then initiate the same kind of ... shutdown that had already been initiated once the user has responded to ... like saving all open files with an ...
    (microsoft.public.dotnet.languages.vc)
  • ACPI shutdown problem
    ... > that would initiate a proper shutdown. ... and will complete the shutdown after I hit the any ... sysctl hw.acpi should show you what the power button event generates. ...
    (freebsd-current)
  • Re: WinXP Shutdown hangs, hard drive powers off
    ... After the transfer, I've noticed the following behaviour: during shutdown, while WinXP is 'saving your settings', the drive will reach the point where it should automatically shutdown the system. ... Instead, only the hard drive powers off and the rest of the system remains on. ...
    (microsoft.public.windowsxp.hardware)