SetupController m_comSetup = new SetupController();
ReturnValue ret = m_comSetup.OpenScript(null, null, null, m_comData);
OR
Type objType = m_comSetup.GetType();
ReturnValue ret = (KfxReturnValue)objType.GetType().InvokeMember("OpenScript", System.Reflection.BindingFlags.InvokeMethod, null, m_comSetup, data);
Both the above code snipets works fine in 3.5 framework but in framework 4.0 they fail. The 'openscript' is a c++ method(calling via interop) & on tracing looks like GetTypeFromProgID is not returning correct object due to that InvokeMember always returns -3.
Some blogs say it could be a bug in framework, but coudnt find any fix or alternatives..
Anyone has any solution or suggestion for this issue? Pl help