flat assembler
Message board for the users of flat assembler.

Index > Windows > Updating resources with memory templates

Author
Thread Post new topic Reply to topic
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 26 Jun 2004, 11:17
Hi friends,

Here is my tiny example modifying the icon of an executable. The technique is based on using memory templates extracted from compiled resource files. To get the binary resource file (rsrc.bin), I used the res2bin tool.


1.Check the "msgbox.exe" file in the attachment. Look at the icon.
2.Now, run the "update.exe" file, you will notice that the icon of msgbox.exe is updated!


Description: Example of updating icon resources
Download
Filename: Updtrc.zip
Filesize: 3.59 KB
Downloaded: 466 Time(s)


_________________
Code it... That's all...
Post 26 Jun 2004, 11:17
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 26 Jun 2004, 11:55
Nice example! Smile
Post 26 Jun 2004, 11:55
View user's profile Send private message Visit poster's website Reply with quote
jekyll



Joined: 25 May 2004
Posts: 14
jekyll 26 Jun 2004, 21:24
it's not work on my XP Pro Sad
Post 26 Jun 2004, 21:24
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 27 Jun 2004, 09:31
Hi jekyll,

My example runs on Win XP He Sp1a, it should run also on Win XP Pro.

Before running updaterc.exe, have look at the icon of msgbox.exe, you will see a "funny face". Now run updaterc, you will see that the "face" becomes a blue colored bug! Smile

_________________
Code it... That's all...
Post 27 Jun 2004, 09:31
View user's profile Send private message Visit poster's website Reply with quote
Tommy



Joined: 17 Jun 2003
Posts: 489
Location: Norway
Tommy 27 Jun 2004, 16:24
It works on my WinXP Pro Sp1...
Post 27 Jun 2004, 16:24
View user's profile Send private message Visit poster's website Reply with quote
jekyll



Joined: 25 May 2004
Posts: 14
jekyll 27 Jun 2004, 20:36
Hi, Vortex!

It's not work!!!!!
Try 1:
Start 'MsgBox.exe' and not close it;
start 'updaterc.exe'
Your program create temp file on my disk named 'rcxNN.tmp', where NN is hexadecimal number. and if run 'updaterc.exe' once more it create new 'rcxNN.tmp'. GetTempFileName? files 'rcxNN.tmp' was not deleted after 'updaterc.exe' was closed.

Try 2:
start 'msgbox.exe'; close it;
start 'updaterc.exe' it create file 'rcxNN.temp', than delete it!
nothing happens!

Try3:
do try 1 than rename file 'rcxNN.tmp' to executable file; start it - ICON CHANGE.

But i think program must rewrite 'msgbox.exe'.
Post 27 Jun 2004, 20:36
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 28 Jun 2004, 18:43
Hi jekyll,

All you need to do is to run updaterc.exe without running msgbox.exe

_________________
Code it... That's all...
Post 28 Jun 2004, 18:43
View user's profile Send private message Visit poster's website Reply with quote
asmdemon



Joined: 18 Jan 2004
Posts: 97
Location: Virginia Beach, VA
asmdemon 28 Jun 2004, 21:53
it works on my xp pro sp1
Post 28 Jun 2004, 21:53
View user's profile Send private message Visit poster's website Reply with quote
jekyll



Joined: 25 May 2004
Posts: 14
jekyll 30 Jun 2004, 03:56
Hi, Vortex!

Some strange thing. I run updaterc, than i run msgbox - icon change ok. i delete directory containing this example, than i run msgbox under archive program - icon old. But when i unpack it and run - icon new! Funny! Smile
Post 30 Jun 2004, 03:56
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 30 Jun 2004, 09:57
Hi jekyll,

Glad to learn that you are O.K with my example program, just don't try to run it from the unzipped file as it may give unpredictable effects.

_________________
Code it... That's all...
Post 30 Jun 2004, 09:57
View user's profile Send private message Visit poster's website Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
Vortex 10 Jul 2004, 10:29
Another method of updating resources is to use a resource linker:

http://c--sphinx.narod.ru/FILES/rl.zip

or

http://sheker.chat.ru/rl.zip

_________________
Code it... That's all...
Post 10 Jul 2004, 10:29
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.