Sign in to follow this  
Brocketino

Writing data to a executing file

Recommended Posts

Nope. An executing file, or a file being read from has a write lock on it, so you'll only be able to read from it.

What exactly are you trying to do? There's usually better ways around this. Assuming you're using UpdateResource() or something, you can copy the EXE, then update the resource, then copy it back. I'll explain more if that's actually what you're doing.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Brocketino
Is it possible to get write access permission to a executing file?

What exactly are you trying to do?
If you are thinking of self-modifying code, you can simply map the file to memory and get a handle to modify the memory-mapped file, rather than directly the file on disk.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by discman1028
Quote:
Original post by Brocketino
We like to know your flesh...


Huh?


Just send him a nude photo of yourself, like all of the previous respondents did, too!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this