sample Matlab COM object for C# .NET Framework application

2 ビュー (過去 30 日間)
Programmer x.0
Programmer x.0 2021 年 11 月 2 日
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

回答 (1 件)

Christopher McCausland
Christopher McCausland 2021 年 11 月 2 日
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 件のコメント
Programmer x.0
Programmer x.0 2021 年 11 月 7 日
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
Christopher McCausland
Christopher McCausland 2021 年 11 月 7 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCOM Component Integration についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by