Re: self modifying exe
From: Tim Robinson (tim.at.gaat.freeserve.co.uk_at_invalid.com)
Date: 06/23/04
- Next message: William DePalo [MVP VC++]: "Re: Getting chars from a String"
- Previous message: Tim Robinson: "Re: How can i use USB port in visual C++?"
- In reply to: Farooq Khan: "Re: self modifying exe"
- Next in thread: Alexander Grigoriev: "Re: self modifying exe"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 19:49:16 +0100
Farooq Khan wrote:
> well, i want it be modifying itself and writing back changes to disk.
> let me tell what this application be doing exactly.
> this applcation would be writing application exit time somewhere in
> it and reading it afterwards when it is launched again to do some
> calculation. i cannot go for registry or any other thing.
> thanks.
Self-modifying EXEs don't work because Windows itself locks the EXE file.
You won't be able to open the file for write access while the EXE is
running.
Modifying EXEs in general usually won't work because ordinary users don't
have write access to the Program Files directory.
In any case, what do you intend to do if more than one user uses your
application? With your scheme, they will overwrite each others' changes.
-- Tim Robinson (MVP, Windows SDK) http://mobius.sourceforge.net/
- Next message: William DePalo [MVP VC++]: "Re: Getting chars from a String"
- Previous message: Tim Robinson: "Re: How can i use USB port in visual C++?"
- In reply to: Farooq Khan: "Re: self modifying exe"
- Next in thread: Alexander Grigoriev: "Re: self modifying exe"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|