Changing resources in other Win32-dll / exe

There is a Resource Hacker program that allows you to modify resources in other dll and exe win32 (64) files.

I need to do the same, but programmatically. Is it possible to do this using the .Net framework? What is a good starting point for this?

+4
source share
5 answers

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

+7
source

Take a look at Anolis.Resourcer . Seems like you need

Clone ResHacker, designed as a test bench for Anolis.Core and for replacing ResHacker (since ResHacker does not support x64, the XN resource editor (spiritual extension of ResHacker) does not support multilingual resources and is heavily crashed, while the other utilities cost real money. It has a powerful but simplified user interface that does not duplicate commands or confuses users with special case handlers (which ResHacker and XN have at their peak).

0
source

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 are used and use their .NET equivalent.

0
source

Note that none of them will work if you are dealing with signed EXEs or DLLs.

0
source

Well, as I see it, this is not an easy task, so I use the Resource Hacker command line interface .

0
source

Source: https://habr.com/ru/post/1398450/


All Articles