Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mdifying an 'exe' file while it is running

Status
Not open for further replies.

jugjones

Programmer
Aug 4, 2000
4
0
0
US
I need to save some data in an 'exe' file,
but Windows 98 locks the file while it executes.
Is there a way around this?
 
Hi,
are you talking about SELF modifying code? Can you give an example about what you data you want to save? Why can't you just write the data out to a file and read it back in the next time the program runs?
 
As far as I know it isn't. While an exe file is running is read-only because the sistem uses a MapViewOfFile to speed-up the execution.

Try to put data in an external file(encode it as you wish) then when the program exits you can clean up with DeleteFile or something else.

HTH, s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
This is a program encasing an encryted document and for security reasons it must modify itself. The idea is to
have a small file to pass around the circuit of users by
disket or email without leaving any configuration garbage
behind. Please respond if you can help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top