calling injected method

Oct 26, 2013 at 10:14 AM
Hello Mr Ganshani,

I injected my dll into assembly that assembly has a Close() method.
I am trying to call close() method like this :


injection.GetType().InvokeMember("Close()",
BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Static,
null, null, null);
but I get error message that says “ Method CInject.Injections.Library.CInjection.Close() not found “.

Actualy I am trying to call WotC.MTGO.Client.CustomUI.ChatPanel::Close() ı dont know what i am doing wrong. ,Hope you can help me about it.

Regards
ERDEM
Coordinator
Nov 25, 2013 at 3:17 AM
This is because you are trying to invoke Close method on CInjection object and not on ChatPanel object.

You need to find ChatPanel object and then use InvokeMember function on it.