c# - Get Assembly of program from a DLL -
i access function of program attached dll.
in dll i've tried:
assembly assembly = assembly.getexecutingassembly(); type type = assembly.gettype("uranium"); methodinfo methodinfo = type.getmethod("util"); methodinfo.invoke("sendclient", new object[] { packet.getdata()});
but not works null exception not line. running program called , namespace 'uranium', class 'util' , function 'sendclient'.
i have been able solve on own.
code:
assembly assembly = assembly.loadfrom("uranium.exe"); type type = assembly.gettype("uranium.util"); methodinfo methodinfo = type.getmethod("sendclient"); methodinfo.invoke(null, new object[] { packet.getdata() });
Comments
Post a Comment