Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys, I have a project that calls Matlab as a COM server.
I define : ML = CreateObject("Matlab.Application")
and use ML.Execute("...") or Call ML.PutWorkspaceData("x", "base", z)
and such.

Recently when I deployed the project in VS2010 Win7 and get the setup.exe, and run it on an XP machine,
I got an error during installation : Could not register type library for file MLApp.tlb...
And when I exclude the MLApp.tlb from the installer project, build it again , the installer run on the XP with no errors.

So I'm just wondering whether the MLApp.tlb is necessary for the application. The workaround by excluding it from the installer project works
probably only because I have installed that program on that XP several times and the library was already registered, or some other reasons.
Any ideas appreciated.Thx
-------------
update:
The project was upgraded from vb6 to .net, and it used to define ML as
ML = New MLApp.MLApp
I guess after switching to ML = CreateObject("Matlab.Application") during the upgrade, things changed.
I do remember during debug that I had to add the MLApp as a reference in the .net project to get rid of some debug errors.
Posted
Updated 30-Jul-12 10:07am
v2
Comments
[no name] 30-Jul-12 14:30pm    
I have never heard of anything that had a .tlb as a dependency.
SandiegoSSD 30-Jul-12 16:06pm    
The project was upgraded from vb6 to .net, and it used to define ML as
ML = New MLApp.MLApp
I guess after switching to ML = CreateObject("Matlab.Application") during the upgrade, things changed.
I do remember during debug that I had to add the MLApp as a reference in the .net project to get rid of some debug errors.

1 solution

I'm guessing the interop needs the typelib to marshal with

So, yes, you need it

I'd investigate why it failed to register - again, normally this is caused by the installing user not having registry write access
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900