0

I'm trying to use Reflexil to log a string in an existing method in a dll I haven't got the source code to. The problem is, I can add a method that uses System.IO because I'm trying to add it to a dll that didn't use file writing before and can't add references.

Is there some log writing command that is accessible through System.dll I can use?

omni96
  • 41
  • 1
  • 10
  • All `System.IO.File.*` methods are located in mscorlib.dll and are useable without new references. – thehennyy Feb 04 '17 at 10:52
  • @thehennyy That's weird then. It might have to do with reflexil not letting any usage of external members, but for some reason it does work with their code editor – omni96 Feb 04 '17 at 14:47
  • Even the basic assemblies mscorlib.dll and System.dll have to be loaded into the decompiler, then the reflexil ui should let you select methods from these assemblies. – thehennyy Feb 04 '17 at 15:05
  • @thehennyy I didn't find any way to load it It's funny because the code editor window of reflexil has some kind of intelisense which does recognize these function – omni96 Feb 04 '17 at 18:34
  • I am using reflexil in JustDecompile and i have to load other assemblies into JustDecompile first to create references in reflexil to them. – thehennyy Feb 04 '17 at 20:43
  • I'm not sure that's what I'm looking for – omni96 Feb 06 '17 at 20:49

1 Answers1

0

This is a partial solution to the problem

I modified the original constructor to a normal method Created a new constructor and matched the signature then called the new method with the addition of the logging code

For now this compiles, but for some reason the exe crashes the second it starts

omni96
  • 41
  • 1
  • 10