There's no way you can do that because you're not in control of anything 
outside your application (ie: the operation system). You CAN save the contents 
of your RAM but it would be worthless because it contains references to 
operating-system allocated structures (file pointers, window handles, 
what-not). Even if it didn't contain references to operating-system structures 
re-loading the same content in RAM would be almost impossible because you'd 
need to reload at the EXACT same location in memory: if you don't do that 
pointers become invalid.

You'll have to save the state of your application explicitly, using other 
means. 

--
Cosmin Prund 

> -----Mesaj original-----
> De la: [email protected] [mailto:[email protected]] În
> numele Chris Stebbing
> Trimis: Friday, January 23, 2009 2:29 AM
> Către: Delphi List
> Subiect: Hibernating an application
> 
> Hi All,
> 
> is it possible (as in is there any software out there that would
> allow me to do this) to hibernate an application?
> 
> When a laptop goes into hibernate mode it saves a memory snapshost
> and resumes with everything exactly where it was - I've done this
> with media player running and the songs resume exactly where it left
> off.
> 
> I would like to take regular memory snapshots of my application and
> in the case of a power failure be able to resume my application
> exactly where it left off at the last snapshot.  Does anyone know of
> anything that might allow me to do this?
> 
> Cheers,
> Chris.
> 
> _______________________________________________
> Delphi mailing list -> [email protected]
> http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to