flat assembler
Message board for the users of flat assembler.
Index
> Windows > Simple method of adding resources to Fasm |
Author |
|
Vortex 08 Jul 2003, 09:02
Hi friends,
You can add compiled resource scripts to the executables assembled with Fasm.The method is based on using a free resource linker (6.5Kb.) from the Sphinx C-- website. 1)First,you add an "empty" resource section to the end of your source file,this provides enough room for the resource section in the PE object table: Code:
section '.rsrc' resource data readable
2)Assemble the source file. 3)You delete the resource section body and add the compiled resource file(.res) to the executable.This trick of "removing the resource section" is required;otherwise the executable will not run on Win XP: Code: rl menu.exe /d rl menu.exe rsrc.res /a The advantage of this method that you can use directly all your resource scripts with Fasm,just enough to have the final compiled resource file (.res) Another advantage;you don't need of .obj files. A very usefull and free resource editor available from Hutch's homepage: http://www.movsd.com/download/nre.exe The free resource linker (included in the attachment): http://sheker.chat.ru/rl.zip
_________________ Code it... That's all... |
|||||||||||
08 Jul 2003, 09:02 |
|
Blag 08 Jul 2003, 14:55
Thanx Vortex and Aquila......i'm a newbie in FASM, but i know programming for a long time....and i can see that this is a great contribution.
|
|||
08 Jul 2003, 14:55 |
|
BiDark 09 Jul 2003, 01:59
I just put the blank resource section to the last and use ResourceEditor and PEditor to edit (easy to expand in the future).
|
|||
09 Jul 2003, 01:59 |
|
Tomasz Grysztar 09 Jul 2003, 23:35
Aquila: that might not work because resource data contains some RVA addresses and these can be changed when you place your resource section in some other place of file.
|
|||
09 Jul 2003, 23:35 |
|
Vortex 18 Jul 2003, 13:55
Aquila,
Have you tried Resource Hacker? Quote:
http://www.users.on.net/johnson/resourcehacker/ _________________ Code it... That's all... |
|||
18 Jul 2003, 13:55 |
|
Vortex 21 Sep 2004, 15:33
Hi friends,
Another method of embedding resources is to read binary resource data bytes from a .res file. This is equivalent to a dialog box template in memory. Code: pDlgbox FILE 'Rsrc.res' : 50h ;Skip the header to read directly binary resource data This trick appears to be O.K for simple dialog box resources. Without the resource section, the size of the final executable drops down by 512 bytes.
_________________ Code it... That's all... |
|||||||||||
21 Sep 2004, 15:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.