BeginUpdateResource API

I am having problems changing resources
in an already compiled EXE.

I believe this is done with


If someone can make a quick example then i will be set.
Who is Participating?
MadshiConnect With a Mentor Commented:
This APIs work only for winNT. Perhaps that's the problem?

Regards, Madshi.
get the "delphi resource editor" from here:
it contains full source including these apis you ask for examples of.
Regards Barry
OrCuSAuthor Commented:
Madshi, question solved, but not problem solved :(

What im doing is creating a song player
that incorporates the song file in the resource, i want to be able to let the user change the song.

The only other way i know is concatenation, but then i lose out on exe compression.

Please help
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

>> The only other way i know is concatenation, but then i lose out on exe compression.

Don't know what you mean...

Why not putting the song behind the exe?

[executable][song][song header]

Regards, Madshi.
this sounds interesting ;-)
OrCuSAuthor Commented:
Well i was planning on storing an un-compressed & encrypted version of the EXE within a resource...

Adding the song to the compiled EXE then Compressing and encrypting, so not only is the EXE compressed but also the song.

Im pretty sure the EXE compressors i have will choke on the extra data if i concatenate the song on to the end of the executable

even so i wont be able to access the data if its compressed when concatenated.  

I was thinking of using a conmpression format for the song, like rar or ace, zip then compress then concatenate. I cant think of anything else.
Well, I don't understand fully how your plans were. Anyway, here comes my suggestion:

Compile your EXE and compress it with an exe compressor.
Compress the sound file (e.g. with zip) and simply store it behind your executable.

This will result in the smallest combined file I can think of. The EXE compressor won't be able to compress the sound file more than zip does. So what do you want more than that?

Regards, Madshi.
OrCuSAuthor Commented:
Answered my question i guess, not worth 150 points though what was i thinking :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.