Performing a task when shutdown or logoff is called
From: lallous (lallous_at_lgwm.org)
Date: 01/12/05
- Next message: Daniel Lidström: "Find out what exception was thrown"
- Previous message: Mark Jerde: "Re: Data Records Formats Testing Tool"
- Next in thread: ectoplasm: "Re: Performing a task when shutdown or logoff is called"
- Reply: ectoplasm: "Re: Performing a task when shutdown or logoff is called"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 16:58:21 +0200
Hello
I have create a simply hidden window that listens for WM_QUERYENDSESSION.
When that message occurs, I simply start the task and block the call till
the task is finished.
Once the task is finished, the system is allowed to continue the shutdown
process.
However, if the task tasks more time than usual, the "End now" dialog is
appearing and wanting to close my application.
How can I perform any task (no matter how long) on before shutdown and when
the task is over, the system should resume shutdown ?
I can think of a solution as:
1.when query end session is captured, simply tell the system to cancel
shutdown
2.carry the task
3.re-issue shutdown myself
However, I might not have enough privilege to logoff/restart/shutdown the
system at step3.
-- Elias
- Next message: Daniel Lidström: "Find out what exception was thrown"
- Previous message: Mark Jerde: "Re: Data Records Formats Testing Tool"
- Next in thread: ectoplasm: "Re: Performing a task when shutdown or logoff is called"
- Reply: ectoplasm: "Re: Performing a task when shutdown or logoff is called"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|