Reverse Engineering Team Board

Reverse Engineering Team Board (http://www.reteam.org/board/index.php)
-   .NET Reverse Engineering (http://www.reteam.org/board/forumdisplay.php?f=28)
-   -   Manually add a method to a DLL - Possible? (http://www.reteam.org/board/showthread.php?t=4630)

Marton 02-27-2012 12:00 PM

Manually add a method to a DLL - Possible?
 
Is there a way to add a method to a DLL?
I want to use a DLL of an older version of a target, in a newer version. On startup I get an error:
Method 'IsSecondInstance' in type 'App.Activator.Activator' from assembly 'App.Collector, Version=1.0.4198.19407, Culture=neutral, PublicKeyToken=null' does not have an implementation.
So I want to add "IsSecondInstance" manually, is it possible? Any tools to recommend? Thanks!

kao 02-27-2012 12:20 PM

Why do you want to use old DLL with new executable? In general it's a bad idea.

Normally I would suggest Mono.Cecil, as it can add new functions to assembly. But taken into account your previous question:
http://reteam.org/board/showthread.php?t=4472
I doubt that it will work because Mono.Cecil cannot handle mixed-mode assemblies.

Either:
a) patch main exe so that it doesn't require IsSecondInstance and use old DLL or;
b) patch new DLL like normal people do.


All times are GMT -4. The time now is 07:51 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.