Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
i m working on a project which will save the state of all computer programs in case computer gets hanged.
this software will run in background and will save state of all programs before computer hangs and later resumes working from earliar state.
thus it will save users work and time.

[edit]Spurious code block removed - OriginalGriff[/edit]
Posted
Updated 25-Aug-11 23:11pm
v2
Comments
Philippe Mori 26-Aug-11 19:39pm    
Humm... computer hang? These days it happen so infrequently that if it does happen, you probably have some hardware problem or a bad drivers... The best thing to do if you computer hang a lot and its driver are up to date would be to buy another computer...

If it would be that easy, Windows would provide it itself.

If one application in particular hangs... the best thing to do it to save frequently in that application. Some applications do have their owns auto-save feature and auto-restart (most recent Microsoft applications).

You cannot do that without the cooperation on the running applications, hence you plainly cannot do that.
All you can do is recording (and periodically update) a list of running applications and, after the PC restart, run again such applications.
 
Share this answer
 
v2
Comments
Philippe Mori 26-Aug-11 19:38pm    
Also, it would be extremelly complex and your program might cause more hang and problem by itself than it would solve. As mentionned, each application has to be coded appropriatly for that to happen.
I think you are on a loser here: in order to do that, you would have to save the entire state of the PC memory (both physical and virtual) continually, probably with some HDD status as well.

Do you realize how much data you would be saving, and how often you would be saving it? Plus, there are other problems:
1) Saving the virtual memory content would mean paging it back into physical memory, so the act of saving would change the data saved...
2) You can't access all the system memory directly without access to OS low level stuff.
3) You have to work out what constitutes a "PC hang" event and detect it. Then you have to not save after it...
and so on.

Find another project: this one is a big fail waiting to happen.
 
Share this answer
 
This is the IT version of the "let's try to reduce the entropy of a system" problem.
You can succeed only by creating more on another system, that probably doesn't want it!
It's anti-physics.
 
Share this answer
 
Comments
mbue 26-Aug-11 9:21am    
This problem ends up with an infinite loop to save itself (cause its a part of the computer).
Regards.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900