editing filies within the blitzmax exe

BlitzMax Forums/BlitzMax Beginners Area/editing filies within the blitzmax exe

DREAM(Posted 2007) [#1]
Is it at all possible to say take a highscore table file that has been incbin:: into the exe, take it out, edit it if some one has beaten the scores and then put it back inside the exe without leaving a trace of it behind.....? and access it in the meantime for general reference......


Brucey(Posted 2007) [#2]
No reason why not.

Open the exe in a hex editor, find the incbin'd file data, and change it.
Hard to add more stuff to the file, but easy to change specific contents.


DREAM(Posted 2007) [#3]
i am talking about on the fly , something that blitz max could do without you knowing......


Brucey(Posted 2007) [#4]
Ahh... well, given you have the Pointer to the incbin'd file, you should be able to amend the data at various locations.

But once you quit the app, the changes would be gone with it.


DREAM(Posted 2007) [#5]
so it wouldnt save the new highscore data for instance.....


tonyg(Posted 2007) [#6]
this?
<edit> maybe not... that's in memory
Why does it have to be BlitzMax that you use?


DREAM(Posted 2007) [#7]
i can make a highscore table and stick it in the same drawer as the main exe i was just wondering wether it was possible to do it, just to make things tidier so i didn't have to run it from a directory drawer i could run it anywhere and not worry about it dumping files here and there


tonyg(Posted 2007) [#8]
I agree with Brucey then.
You could change the highscore table in memory which would be lost when the app close.
You can't open the .exe for writing (unhandled memory exception) as it is locked by the OS (certainly by Windows anyway).


Paul "Taiphoz"(Posted 2007) [#9]
make your high scores on-line ? or default to a file if the connection isn't made.


anawiki(Posted 2007) [#10]
Even if you could open it for writing it would be bad idea due to Limited User Accounts. Use app data folders for storing your data.


doswelk(Posted 2007) [#11]
Not to mention that normally modifying a .exe file would cause the anti-virus software to block it. (Not a good way to earn peoples trust, then when they exit your game they get a virus warning!)