Matlab COM server and Matlab COM objects

Discussion in 'MATLAB' started by Mauro Maggioni, Jan 25, 2004.

  1. 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 engine
    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 tried
    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,

    Mauro
     
    Mauro Maggioni, Jan 25, 2004
    #1
    1. Advertisements

  2. 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
     
    Mauro Maggioni, Jan 25, 2004
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.