i saw in pe-tutorial about import table, and i want to know about resource table.
for example i want to know that where is icon of exe file in it?
for example i want to know that where is icon of exe file in it?
Resource format in the PE file is undocumented. Ask Ewayne or me about it. :grin: Mostly what I know is wadding through Ewayne's source and looking at files in Hexeditor. Feel free to ask anything
To find the icon resource in the PE file,
1. Look through the Optional Header and enter the IMAGE_RESOURCE_DIRECTORY.
2. Extract the NumberofIDEntry and compare it with 3(Icon)
3. Look into the NumberofIDEntry and the NumberofNamedEntry and get the ID or name of the resource
4. Look into the NumberofIDEntry and the NumberofNamedEntry and get the Language
5. Now you have the size and address to the resource.
To find the icon resource in the PE file,
1. Look through the Optional Header and enter the IMAGE_RESOURCE_DIRECTORY.
2. Extract the NumberofIDEntry and compare it with 3(Icon)
3. Look into the NumberofIDEntry and the NumberofNamedEntry and get the ID or name of the resource
4. Look into the NumberofIDEntry and the NumberofNamedEntry and get the Language
5. Now you have the size and address to the resource.
thanks for your help
but i need more information. i find resource table address but i can't continue.
i want needed structure.
thanks
but i need more information. i find resource table address but i can't continue.
i want needed structure.
thanks
Hi
Search for "res" or "ico" or "cur" at www.wotsit.org for a start. Use a PE explorer such as PEBrowsePro (Russell Osterlund) or Peridump (Jeremy Collake) and study a target program like notepad or your own example and compare in a hex editor. Learn how the rsrc section headers and binaries are structured in a "tree" format and you'll be well on your way to understanding the resource structure.
Besides, most of the major PE format documentations (Pietrek, Luevelsmeyer, O'Leary, Kath) explain the rsrc structure fully.
Kayaker
Search for "res" or "ico" or "cur" at www.wotsit.org for a start. Use a PE explorer such as PEBrowsePro (Russell Osterlund) or Peridump (Jeremy Collake) and study a target program like notepad or your own example and compare in a hex editor. Learn how the rsrc section headers and binaries are structured in a "tree" format and you'll be well on your way to understanding the resource structure.
Besides, most of the major PE format documentations (Pietrek, Luevelsmeyer, O'Leary, Kath) explain the rsrc structure fully.
Kayaker
but i need more information. i find resource table address but i can't continue.
You mean you found the resource table entry of the language, ID or the address to the resource?
The format the resource is in is really undocumentated, the O'Leary PE on that topic is outdated (It did not even describe MenuEx and stufffs like that).
Granted the O'Leary and other docs only cover the general structure of the resource format, there is another excellent doc that details the individual resource types in depth. I'm sure many here have heard of it, Win32 Binary Resource Formats by Floyd Rogers, the file is called resfmt.txt and I believe can also be found at wotsit. Written in '99 it still seems to cover most of the currently used Resources, Controls and Statements described by MSDN, with the exception of MenuEx and possibly a few others.
That aside, if you were talking about Ewayne's ResEdit earlier, there's no question this is excellent work and there's much to be learned from the sources, along with his Control Builder programs and other accomplishments of course. That's the great thing about this board, the free sharing of sources, wonderful stuff!
Regards,
Kayaker
That aside, if you were talking about Ewayne's ResEdit earlier, there's no question this is excellent work and there's much to be learned from the sources, along with his Control Builder programs and other accomplishments of course. That's the great thing about this board, the free sharing of sources, wonderful stuff!
Regards,
Kayaker
Written in '99 it still seems to cover most of the currently used Resources, Controls and Statements described by MSDN, with the exception of MenuEx and possibly a few others.
I have yet to see the 99 verison... can post the link? All i have is the '93 verison...
Sure. Might be the same version but here's the copy I have.
It is abit outdated :grin: But that's the only document on resource