i do believe that the early binding type lib that exists is for the earlier version of AB. that is why i am using the late binding. Not sure why TJ chooses not to update the type lib with the new versions that he churns out.
--- In [email protected], "tuzo_wilson" <j.tuzo.wil...@...> wrote: > > --- In [email protected], "murthysuresh" <money@> wrote: > > > > i seem to get compile errors and obviously am doing something wrong. > > If you want to continue the approach you started then you will have to > use the System.Reflection namespace to use late binding. For example: > > Type brokerType = > Type.GetTypeFromProgID("Broker.Application"); > object brokerObject = Activator.CreateInstance(brokerType); > > object analysis = brokerType.InvokeMember("Analysis", > BindingFlags.GetProperty, > null, > brokerObject, > null); > > object retVal = brokerType.InvokeMember("Backtest", > BindingFlags.InvokeMethod, > null, > analysis, > new object[] { 0 }); > > > If you have the ability to use VB.Net you can take advantage of its > built in late binding. In VB, the same functionality as above would > look like: > > Dim broker = CreateObject("Broker.Application") > > Dim analysis = broker.Analysis > analysis.Backtest(0) > > > There is also an early binding type library in the members zone that you > could use. I haven't used it -- just curious if anyone is using it? > > > Tuzo >
