Take the 2-minute tour ×

Is there any free library out there that can provide editing capabilites for resources in Win32 PE files?

It needs to be able to do the following:

  • Provide a reasonably simple API for altering dialog resources (including the "extended" dialog version, which is poorly documented).
    Editing dialogs with UpdateResource by hand is a major pain in the rear, since most of the structures' fields are variable-length, and encoding/decoding them is very error-prone and time consuming to code.

  • Handle both 32-bit and 64-bit PE files

  • Have support for widely used resource types (string tables, bitmaps, etc.)

  • Be able to handle any kind of valid resource (even if it's not widely used), even if that means just providing a simple copy to/from binary.

  • I don't care about .res files, and I really don't need .rc functionality. I just need PE editing.

C, C++, and C# are all fine, although I prefer C# since it's easier to code with. My main concern is dialog editing for 32-bit and 64-bit PE files, so that's the most important factor.

share|improve this question
I've spent hundreds if not thousands of hours decoding all details of resources and PE formats to create appTranslator (at a time where SO didn't exist yet). Now if it appears that such a library exists and could have save me all those sleepless nights, I'll go jump from a bridge :-D –  Serge - appTranslator Aug 13 '11 at 8:18
@Serge: Oh dang -- I should delete my question then, I don't want it to cost someone's life lol. –  Mehrdad Aug 13 '11 at 8:21
Take the sparsity of such libraries as a strong hint that it isn't that useful. That starts with not being able to edit resources when the file is loaded into a process, there's a strong lock on it from the memory mapped file. Followed by disappointment when discovering that UpdateResource is pretty limited. And ends with everybody having an IDE at their fingertips that already supports editing resources. Even in PE32 files, File + Open + File in VS. Hope Serge doesn't read this. –  Hans Passant Aug 13 '11 at 11:48
@Hans: I'm totally aware of all this. In my case, it was totally worth the effort though: appTranslator sells decently well and users usually love it, thank you ;-) –  Serge - appTranslator Aug 13 '11 at 12:32
@Hans: Lol. The trouble with VS (or Resource Hacker or whatever) is that it's not useful for batch operation. Often times I need to make a change (e.g. global find/replace, global search for a certain-sized image) to some resources, and I have no way of doing that without major pain in the rear. At the very least, it requires exporting and re-importing the resources, and praying that nothing got messed up. I haven't tried this with VS, but with Resource Hacker it certainly doesn't scale. Unless you happen to know of a way to use a macro for this in VS, I just can't find VS useful for this. :\ –  Mehrdad Aug 13 '11 at 15:38
add comment

2 Answers

Its only for 32bit, but resourcehacker might be a good substitute till you find something better.

share|improve this answer
add comment
up vote 0 down vote accepted

I haven't gotten the chance to test it, but I found Anolis.Resourcer which seems to be pretty capable.

share|improve this answer
add comment

Your Answer


