This isn’t possible in general. If you tried it, it might fail in subtle and unpredictable ways. Here are a few potential problems:
- The process might store its process ID and thread IDs. When you restore it, there is no good way to ensure it gets the same IDs.
- The process might have files locked. There’s no way to ensure those files are in the same state.
- The process might have files open that no longer exist later. Consider temporary files.
- The process might have sockets or pipes open either internally or even to other processes.
- The process might have manipulated shared state that communicates with other processes and stopping the process with that shared state in an inconsistent state might disrupt other processes.
- The process might have a lock on DLLs or other executable files that may not exist identically when you try to restart the process.
There are a lot of other problems as well. Generally platforms that provide application save/restore capability are either very limited in what they let applications do or they require the close cooperation of the applications.
solved How to create and restore memory image dump [closed]