Resume the tasks with C++ based code

Dear Respected Programmers.

Good morning. I hope you will be fine.
I want to ask that is there any script to add in any code that can resume the task where halted or stopped in the middle of the task. Mean to say that if there is any task running, and system shuts down by power failure, then the task continues from where it was before the shutdown.
Please guide about the script and guide where and how to add in the code.

Please if you can guide. Thank you for kind help and support in advance.
Waiting for helping support.

Regards
closed account (48bpfSEw)
A possible solution would be to catch the WM_ENDSESSION message and store all the relevant informtation (current position etc.) in a dump file before the system is shut down. On restart your task have to look if it has wrote a dump file, restore the data and continue where it stopped.

found here:

http://stackoverflow.com/questions/981306/how-to-detect-whether-windows-is-shutting-down-or-restarting

Topic archived. No new replies allowed.