I am invoking one of the functions from assembly but I am getting MissingMethodException. I have open exe in .netreflector and show that function is available at right place though it is giving error. Here is the code.
private void button2_Click(object sender, EventArgs e)
{
Assembly obj = Assembly.LoadFrom("Solo4O.exe");
Type datacrypt = obj.GetType("Orch.DC");
object[] objects = new object[3];
….
datacrypt.InvokeMember("GetCryptedXML", BindingFlags.InvokeMethod |
BindingFlags.Static |
BindingFlags.Public,
null, datacrypt, objects, null);
}
Your
targetargument isdatacryptbut it should benull, as you’re calling a static method (and you’re definitely not calling a method ondatacrypt).Beyond that, it’s hard to know exactly what’s wrong, partly because you haven’t shown how you’ve initialized
objects… we don’t know what the types involved are. Please show more code. I strongly suspect that one of your argument types is invalid for the method call.