Jump to content
  • Advertisement
Sign in to follow this  
Brocketino

Writing data to a executing file

This topic is 4502 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!