Link to home
Start Free TrialLog in
Avatar of OrCuS
OrCuS

asked on

BeginUpdateResource API

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

I believe this is done with

BeginUpdateResource
UpdateResource
EndUpdateResource

If someone can make a quick example then i will be set.
ASKER CERTIFIED SOLUTION
Avatar of Madshi
Madshi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inthe
inthe

hi,
get the "delphi resource editor" from here:
http://www.wilsonc.demon.co.uk/delphi.htm
it contains full source including these apis you ask for examples of.
Regards Barry
Avatar of OrCuS

ASKER

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
>> 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 ;-)
Listening
Avatar of OrCuS

ASKER

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.
Avatar of OrCuS

ASKER

Answered my question i guess, not worth 150 points though what was i thinking :)