I have two questions:
a) Does anyone know how to embed a resource (such as a text file) into a PE executable after it's been compiled?
b) How to I change a program's icon after it's been compiled?
I'm looking for how to do it within my program (code examples/articles) not tools that can do it.
Embedding resource into PE executable
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Hi,
I think I can answer question 1:
IIRC, in a PE EXE, you can simple tag anything you like on to the end of the file. If the last thing you append is some kind of index in to this data, you can then locate the individual resources (this is not from knowlege of PE's, it is from my dabbling in Windows games development, where I stored a few textures in just this way).
Hope this helps,
Adam
I think I can answer question 1:
IIRC, in a PE EXE, you can simple tag anything you like on to the end of the file. If the last thing you append is some kind of index in to this data, you can then locate the individual resources (this is not from knowlege of PE's, it is from my dabbling in Windows games development, where I stored a few textures in just this way).
Hope this helps,
Adam
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
you might want to look at GNU stuff for implementations.
However these may be easier to read:
http://win32assembly.online.fr/tutorials.html
http://www.x86.org/ftp/manuals/tools/pe.pdf
However these may be easier to read:
http://win32assembly.online.fr/tutorials.html
http://www.x86.org/ftp/manuals/tools/pe.pdf
- AndrewAPrice
- Member
- Posts: 2299
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
After a bit of playing around, I've worked out how to embed data without causing the executable to become corrupt. All I have to do now is find where the icon is stored
Thanks for all your help!
Thanks for all your help!
My OS is Perception.