Is it possible to save a programs current state/the programs memory?
Which program can do that?
Save a program's state
-
- User
- Posts: 41
- Joined: Wed Dec 29, 2004 11:39 am
- Location: Belgium
That's verry difficult, since your program (and all your variables) are somehow randomly (where there is space available) allocated.
I mean if you were capable to capture a programs state, you'll have to put it back in the same memory-adress, else your pointers to variables wil be invalid. Now what if that particullar adress is not available because another program is using it....
A much safer way is to use preference files.
I mean if you were capable to capture a programs state, you'll have to put it back in the same memory-adress, else your pointers to variables wil be invalid. Now what if that particullar adress is not available because another program is using it....
A much safer way is to use preference files.
> A much safer way is to use preference files
From what I can tell, I don't think Bonne_den_kule means in a PureBasic app,
but in apps in general. I'm guessing he's looking for an "Action Replay" type
of app, but I don't think these exist (or are possible) for Windows.
From what I can tell, I don't think Bonne_den_kule means in a PureBasic app,
but in apps in general. I'm guessing he's looking for an "Action Replay" type
of app, but I don't think these exist (or are possible) for Windows.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
- User
- Posts: 41
- Joined: Wed Dec 29, 2004 11:39 am
- Location: Belgium
WinXP can save it's entire state so when you reboot you'll get your desktop back as you left it. The problem is that this is only possible directly before windows starts.
But saving and restoring just a part of the memory
...

But saving and restoring just a part of the memory

I know, that's why I suggested the use of preference filesFrom what I can tell, I don't think Bonne_den_kule means in a PureBasic app,
but in apps in general. I'm guessing he's looking for an "Action Replay" type
of app, but I don't think these exist (or are possible) for Windows.

hmm well you could use a macro to get it back to the state you want it in.Action replay
Program one in AutoIt [http://www.hiddensoft.com/autoit3/]
>> I'm guessing he's looking for an "Action Replay" type of app
>
> I know, that's why I suggested the use of preference files
Do you mean he should code an app that grabs the memory space of an app,
and then save every byte of that memory as a prefs (binary) file?
>
> I know, that's why I suggested the use of preference files
Do you mean he should code an app that grabs the memory space of an app,
and then save every byte of that memory as a prefs (binary) file?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
-
- Addict
- Posts: 841
- Joined: Mon Jun 07, 2004 7:10 pm
> its not easy to make a snapshot of a programs state
Hmm, I was just thinking about your trainer lib... what would happen if you
just queried and saved every byte of the app's memory, and then restored
it later? Crash? I would expect it would because the running app wouldn't
be loaded into the same memory space (as the CodeMaster already said).
But wouldn't there be some way around that? I don't know.
Actually (just thought about it some more) does it really matter where the
app is loaded? I regularly play Quake 2 and the address for health, ammo,
etc never changes... I just poke the same address every time. So what's
the reason behind that?
Hmm, I was just thinking about your trainer lib... what would happen if you
just queried and saved every byte of the app's memory, and then restored
it later? Crash? I would expect it would because the running app wouldn't
be loaded into the same memory space (as the CodeMaster already said).
But wouldn't there be some way around that? I don't know.

Actually (just thought about it some more) does it really matter where the
app is loaded? I regularly play Quake 2 and the address for health, ammo,
etc never changes... I just poke the same address every time. So what's
the reason behind that?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.