how to register dll file in matlab donet builder

Hai , i have build the MagicDemoComp file to dotnet dll file using matlab dotnet builder. I using this dll file in visual studio 2005. I add reference to MagicDemoComp.dll, MWArray.dll ,mlapp.tlb , when i debug , the error "MagicDemoComp.Library not regitered" and " MWComutil Library not registered" are happen. How to register the dll file in window ? using Cmd or matlab commond prompt? I need to install MATLAB Component Runtime (MCR) for running the debug in visual studio ?

 Respuesta aceptada

Friedrich
Friedrich el 10 de Mzo. de 2012

0 votos

Hi,
you don't need the MCR. See here:
Do this for the MWComutil.dll and MagicDemoComp.dll. The mwregsvr command should be known if MATLAB or the MCR is installed correctly (mwregsvr resides in the same folder as needed DLL's). In the case it is not kown, make sure that the MATLABROOT\runtime\ARCH folder is on your PATH. (MATLABROOT = installation folder of MATLAB, ARCH = system architecture (win32 or win64)).
Since registering a COM DLL means modifying the registry, make sure that you have the permission for that.
In addition, you built a COM DLL, so you dont need the MWARRAY.DLL and you also don't need the mlapp.tlb

4 comentarios

renoald Tang
renoald Tang el 11 de Mzo. de 2012
Hai , thank for the reply. I already done what you have suggest and follow the link ,
when i register the mwcomutil.dll using "mwregsvr mwcomutil.dll",
it success , "DllRegisterServer in mwcomutil.dll succeeded"
but i try "mwregsvr MagicDemoComp.dll", can't register ,
the error "Error: 0x0000007f Message: The specified procedure could not be found. " happened!
and i debug again in visual studio( already add reference to mwcomutil and MagicDemo ) , the visual studio give same error :
1.)Cannot load type library for reference "MagicDemoComp". Library not registered
2.) Cannot load type library for reference "MWComUtil". Library not registered.
but MWComutil aready succcesfully register , why still have this error ?
Friedrich
Friedrich el 11 de Mzo. de 2012
Where do you get this error: The specified procedure could not be found? On the development machine or on the deployed machine? When I would have to guess, I would say you get this on the deployed machine because the Visual Studio Redistributable package is missing.
renoald Tang
renoald Tang el 12 de Mzo. de 2012
Yes, on deployed machine. But there not have any error when i install the visual studio. How i resolve it ? Uninstall and install again Visual studio ?
Friedrich
Friedrich el 12 de Mzo. de 2012
Just download the Visual Studio Redistributable package in the matching bitness and version and install it. That's all you should need. You don't have to install the full Visual Studio.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by