Writing a value to a executable file
- From: Raymond Holtzfingeru <darkstar_77@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Jul 2005 21:07:09 -0500
Hello,
I am trying to write a program that will open an executable file and
write a value to it to act as a counter to see how many times the
file has been run. After the file has run a set amount of times, I
want to make the file inoperable. What would be the safest way to
determine where to write that value? Maybe seek to the end of the
file and then step back a few bytes, something like seek(filename,
filesize(filename) -4)? Is there a better/safer way to do that?
thanks.
.
- Follow-Ups:
- Re: Writing a value to a executable file
- From: Dr Engelbert Buxbaum
- Re: Writing a value to a executable file
- From: HubbleBubble
- Re: Writing a value to a executable file
- From: Jim Leonard
- Re: Writing a value to a executable file
- From: prino
- Re: Writing a value to a executable file
- From: Björn Felten
- Re: Writing a value to a executable file
- Prev by Date: Re: For-to variable goes backwards
- Next by Date: Re: Writing a value to a executable file
- Previous by thread: Re: For-to variable goes backwards
- Next by thread: Re: Writing a value to a executable file
- Index(es):
Relevant Pages
|
Loading