I have a com object written in c++ (based on IDispatch interface). I can create an instance happily in vb6 and even in c# (VS2010).
The problem is the following:
I have a console application which handles an instance of my object.
The goal is to launch a vb6 activex.dll with this object passed via a method of this activex.dll which display a form. It works fine but when I quit the function responsible of the activex instantiation, I got a locking effect when I click on a button on the form to access to my object instance assigned to a variable locally.
How could I solve this interlock situation. I was hoping to use xxx.invoke(...) but object or Type do not have this method.
I suppose this is related to managed and un-managed code but does not know actually how to solve that issue.
To create the master COM object I am using :
private bool CreateCOMObject(string ComponentClassName)
bool bRet = false;
_VB6DocType = System.Type.GetTypeFromProgID(ComponentClassName);
_VB6Control = System.Activator.CreateInstance(_VB6DocType);
bRet = true;
Maybe do you have already encontoured such an issue ?
Thank you very much in advance.