More info as of last experiments:
- I create a COM connection to a COM object created by COMTool,
supposedly this object should be Matlab independent (in fact lots of
Matlab library files get included and when I connect to it no matlab
engine is instantiated)
- I then try to connect to the Matlab engine by calling engOpen.
engOpen returns NULL, so I can't connect to the Matlab engine.
- If I do not connect to the COM object created with COMTool, the
call to engOpen is successfull.
- Conversely, if I connect to Matlab first via engOpen, then I cannot
connect to the COm object generated by COMTool.
Any help greatly appreciated.
Mauro Maggioni wrote:
> Hi -
> I have an application that connects to the Matlab engine via COM
> and wants to connect to other Matlab COM objects, created with the
> COM tool, that are Matlab independent. I can connect to either of
> them sucessfully, but not to both: if I connect to the Matlab
> first, when I try to connect to a Matlab compiled COM object the
> CoCreate function says the object is not registered, while if I
> connect to the Matlab COM object first, I can do that successfully
> but when I try to connect to the Matlab engine, again the CoCreate
> function fails saying the object is not registered. Finally, I
> to connect to two instances of the same Matlab COM object and that
> works fine (so I assume I can also connect to two different Matlab
> COM objects).
> Any clue of what's going on, and if it is really not possible to
> have a connection to a Matlab COM object and a connection to the
> Matlab engine both active?
> Thanks in advance for any suggestions. Regards,