The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: thomasantony on April 05, 2005, 03:24:56 PM

Title: Windows Resource Format
Post by: thomasantony on April 05, 2005, 03:24:56 PM
Hi,
   Where can I find more info about how resources are stored in PE executables? I want the format specification. I searched for "PE Resource Format" with no results

Thomas
Title: Re: Windows Resource Format
Post by: roticv on April 05, 2005, 03:36:27 PM
I know there is a document on PE resource floating around but it just describe how is the resources arranged but not abt the data for each resources. I do vaguely remember coding something on that, if you want I can dig it out for you. But I still think the best is the resource editor by Ewayne.
Title: Re: Windows Resource Format
Post by: Vortex on April 05, 2005, 07:12:34 PM
Hi Thomas,

Wotsit's Format is a very usefull site where you can find technical information about the win32 resource format:

You can download both of these zip files mentioned below:
Quote
Win32 Resource File Format [Marco Cocco]
Windows Resource (.RES) Files [Ray Lischner]

http://www.wotsit.org/search.asp?page=4&s=binary
Title: Re: Windows Resource Format
Post by: Vortex on April 05, 2005, 07:16:11 PM
Ooops :)

Thomas, this document can be more usefull:
Quote
By LUEVELSMEYER. An excellent PE tutorial with source codes in C.

http://spiff.tripnet.se/~iczelion/files/pe1.zip
Title: Re: Windows Resource Format
Post by: thomasantony on April 06, 2005, 11:12:31 AM
Hi,
   Going to Wotsit was what I first did. I downloaded the RES file format specs. I got some docs on "PE Resource directory" and its format using google. I would like to change the resources of a file programmatically as BeginUpdateResource etc. functions are not available in win98. BTW whats the difference b/w icon and Group icon? I know donkey has an example of extracting Icons from files and saving them as icons. I will look at that

Thomas
Title: Re: Windows Resource Format
Post by: Vortex on April 06, 2005, 05:35:21 PM
Hi Thomas,

To access those resource functions in Win 9x, you need to download the Microsoft Unicode Layer

QuotePlatform Software Development Kit Redistributable: Microsoft Layer for Unicode on Windows 95, 98, and Me Systems, 1.1.3790.0

http://www.microsoft.com/downloads/details.aspx?FamilyID=73BA7BD7-ED06-4F0D-80A4-2A7EEAEE17E2&displaylang=en
Title: Re: Windows Resource Format
Post by: thomasantony on April 07, 2005, 06:45:37 AM
Hi,
   But the unicows.dll itself is 253 kB and it is a pain in the a** to distribute it with every program. The prog won't work if someone doesn't have the dll. No what I want is to learn more about how they store everything. I found a good example at wotsit itself in the Windows files section. Earlier I had looked only in the graphics files section. I saw an example from donkey on exracting icon resources and saving them as files in the old forum. I will make my own proc to do that. In the meanwhile any help is welcome.

[EDIT] The other link was not allowed due to hotlinking or something
http://www.wotsit.org/search.asp?page=2&s=windows

In this page see the ICO link

Thomas :U
Title: Re: Windows Resource Format
Post by: pbrennick on April 07, 2005, 01:57:43 PM
Thomas,
http://www.wotsit.org/ has banned your link for some reason.  I tried both IE and K-Meleon and got the same result.

Paul
Title: Re: Windows Resource Format
Post by: thomasantony on April 07, 2005, 04:18:40 PM
The working link is in my other post. They don;t seem to allow Hotlinking of files... See the ICO link in that page

Thomas :U
Title: Re: Windows Resource Format
Post by: pbrennick on April 07, 2005, 05:51:42 PM
Thank you, Thomas.

Paul
Title: Re: Windows Resource Format
Post by: Opcode on April 08, 2005, 02:31:17 PM
Interesting article about resource format:

http://blogs.msdn.com/oldnewthing/archive/2004/06/21/161375.aspx


Regards,
Opcode
Title: Re: Windows Resource Format
Post by: PellesC on April 08, 2005, 02:55:05 PM
The resource format for EXE files is basically the same as for RES files, so this might work as a starting point:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources/resourcefileformats.asp

Pelle