申请冻结?

时间:2014-03-10 10:19:45

标签: c++ windows

是否可以编写一个c ++程序,它将对给定的Windows进程执行以下操作:

1) pause an application
2) copy the memory of that application to the HDD
3) kill the application
4) at a later point start the application in the exact same state it was before by loading the saved memory

有人会因为多种原因想要这样做,我相信它在调试方面特别有用。

1 个答案:

答案 0 :(得分:4)

不,不可能。过程映像中的某些值是内核句柄。恢复映像时,这些将没有相应的内核结构。如果你不相信我,你应该相信Raymond Chen:Why can't the system hibernate just one process?

可以创建转储,请参阅How to create a user-mode process dump file in Windows Vista and in Windows 7.dumpMiniDumpWriteDump。多年来,开发人员已成功使用转储器进行调试......