ceth
ceth

Reputation: 45285

Change resources in other Win32-dll/exe

There is a Resource Hacker program which allow to change the resources in the other win32(64) dll and exe files.

I need to do the same thing, but programmaticaly. Is it possible to do it using .Net framework? What is the good starting point to do it?

Upvotes: 4

Views: 2688

Answers (5)

RRUZ
RRUZ

Reputation: 136381

You must use the BeginUpdateResource, UpdateResource and EndUpdateResource WinApi functions, try this page to check the pinvoke .Net signature of these functions, also you can check this project ResourceLib.

Upvotes: 7

ceth
ceth

Reputation: 45285

Well, as I see it is not easy task, so I'll use command line interface of Resource Hacker.

Upvotes: 0

zmbq
zmbq

Reputation: 39013

Note that none of these will work if you're dealing with signed EXEs or DLLs.

Upvotes: 0

Pavel Krymets
Pavel Krymets

Reputation: 6293

Take a look at Anolis.Resourcer. It seems to be the thing you need

A ResHacker clone developed as a testbed for Anolis.Core and to replace ResHacker (because ResHacker doesn't support x64, XN Resource Editor (ResHacker's spiritual sequel) doesn't support multiple-language resources and crashes a lot, and other utilities rest cost actual money. It has a powerful yet simplified UI that doesn't duplicate commands or confuse the users with special-case handlers (which ResHacker and XN have in spades).

Upvotes: 0

Uwe Keim
Uwe Keim

Reputation: 40726

The author points to another tool "XN Resource Editor" which comes with source code (although Delphi, not .NET).

This should be enough to see which functions being used and use the .NET equivalent of them.

Upvotes: 0

Related Questions