Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ope on August 29, 2007, 07:38:53 am

Title: C::B DDE on matlab
Post by: ope on August 29, 2007, 07:38:53 am
Hi,

I start to write a COM Server on Windows like here http://www.mathworks.com/access/helpdesk/help/toolbox/ecoder/index.html?/access/helpdesk/help/toolbox/ecoder/det/f43704.html (http://www.mathworks.com/access/helpdesk/help/toolbox/ecoder/index.html?/access/helpdesk/help/toolbox/ecoder/det/f43704.html) which uses CodeWarrior as example, for use inside Matlab and C::B as Embedded IDE.

This is my first write using COM Objects  :?
Code
function ICodeBlocksApp = CreateCBComObject
    vprint([mfilename ': creating CB com object']);
    try
        ICodeBlocksApp = actxserver('CodeBlocks.CodeBlocksApp');
    catch
        error(['Error creating COM connection to ' ComObj ...
               '. Verify that CodeBlocks is installed correctly. Verify COM access to
               CodeBlocks outside of MATLAB.']);
    end
    return;
I've get the error:
Code
Server creation failed. Invalid ProgID 'CodeBlocks.CodeBlocksApp'
Probably the program ID 'CodeBlocks.CodeBlocksApp' is wrong. I did not found any informations on writing DDE Apps using C::B. Any help appropriate here?

Thanks
Olaf
Title: Re: C::B DDE on matlab
Post by: thomas on August 29, 2007, 09:45:10 am
This should probably give you a hint to the right values:
Code
#define DDE_SERVICE    _T("CODEBLOCKS")
#define DDE_TOPIC    _T("CodeBlocksDDEServer")

No, I don't do DDE, don't ask me :P