how to use ParameterModifier

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi all,
It seems that "ParameterModifier" play an important role
in some case,such as in "Type.InvokeMember",but how to
understand "ParameterModifier" and how to use it?
Some sample code is expected.
 
See your previous posting: How to return reference arguement using
InvokeMember?

Willy.
 
hello,Willy,

I followed your guidance,but exception happened.
My calling code in c# is as folloow:

object [] args={12, 3, 5};
myTest.myclass obj=new heTest.myclass();
Type T=Type.GetTypeFromProgID("heTest.myclass");

ParameterModifier pm = new ParameterModifier(3);
pm[0] = false;
pm[1] = false;
pm[2] = true;
ParameterModifier [] pmods = { pm };

object d = T.InvokeMember("method",
BindingFlags.InvokeMethod, null, obj, args, pmods, null,
null);

Would you please select a COM dll and have a try by
yourself?
Thanks a lot.
 
Back
Top