sample Matlab COM object for C# .NET Framework application

Hello everybody,
I am trying to build a Matlab COM object (encapsulated in a DLL), which I want to use in a C# .NET Framework application. Can somebody please point me to some detailed documentation, or working sample? I use Visual Studio 2019.
Thank you

Réponses (1)

Hi,
The MATLAB documentation has lots of examples and documentation to get you going.
Here's a link to an example. And a second link to the top level MATLAB COM documetation which has many sublinks. That should be enough to get you going!
Let us know how it goes,
Christopher

2 commentaires

Sorry, Christopher
The link you have supplied does not take me to an example of how I can generate a COM object which I can use in a C# project (Visual Studio).
The documentation describes building COM objects for the VB or C++ environments. The C# project I am using cannot load those objects.
Do you have any additional information I can use? My project is C#, Visual Studio 2019, WinForms.
The .NET assembly solution works - but it is excruciatingly slow. To instantiate your sample magic square class takes more than 2 seconds !!
Is there anything you can recommend?
Cheers
Hi,
If you are looking for a specific C# example, here is one. This is locatable from the second link in the first answer which has ALL COM documentation.
Hope this helps,
Christopher

Connectez-vous pour commenter.

Catégories

Produits

Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by