Hi,
I'm using C# to create an app which tests various ActiveX controls.
Given the ProgID of the ActiveX control I want to test and the location
of the .ocx file, how can I get a list of its methods, properties and
events?
Currently, I'm using:
Type T = Type.GetTypeFromProgID("<A Prog ID here>");
Object Control = System.Activator.CreateInstance(Type);
foreach (MethodInfo Method in Type.GetMethods())
{
MessageBox.Show(Method.Name);
}
The problem is that GetMethods returns this list:
GetLifetimeService, InitializeLifetimeService, CreateObjRef, GetType,
ToString, Equals, GetHashCode
instead of the public methods of the actual object.
If I use Type.InvokeMethod(), I can call methods on the control
satisfactorily, but I can't work out how to get a list of its
methods...
Thanks,
Matthew