Home > Archive > Matlab > February 2007 > Using C# .NET created libraries in Matlab
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using C# .NET created libraries in Matlab
|
|
| Martin 2007-02-28, 8:15 am |
| Hello,
I don't know whether this topic has been asked in former discussions,
but unfortunately I couldn't find a proper thread about this topic. I
would like to know whether it is possible to call or embed libraries
that are created in C# .NET from matlab. I know it's possible to
create NET libraries in matlab and reuse them in C#, but is it also
possible do do it the other way? In the current version of matlab
R2006 I only found a way to call ActiveX/COM objects but not NET
libraries.
Do you know if there's a way to do this.
Thanks in advance
Martin
| |
| John Reilly 2007-02-28, 7:14 pm |
| Hi Martin,
You answered your own question! You can create .NET objects that
are, in fact, COM objects. Then you can use them from MATLAB. The
MSDN wasn't particularly helpful to me when I did this, but got there
with a little help from my friends. Codeproject.com may have an
article to help you. If you like, I can email you a dummy test that
I wrote. Just email me at my address (removing the _NOSPAM_ part of
course).
I had one problem. I was unable to pass a vector from MATLAB to C#.
I was just fooling around so I didn't solve this issue.
[A friend of mine, who is the reigning champ (as far as I'm
concerned) when it comes to COM/ActiveX/.NET, says that it is *NOT*
possible to create ActiveX objects in .NET, regardless of whether you
use VB.NET or C#. He actually creates C# .NET COM objects, and then
creates ActiveX objects using C++ ATL and uses that as the shim to
make his .NET object look like ActiveX! AHHHHHHHH! It works, but I
can't help you there. Stick with COM.]
Good luck.
john.
Martin wrote:
>
>
> Hello,
>
> I don't know whether this topic has been asked in former
> discussions,
> but unfortunately I couldn't find a proper thread about this topic.
> I
> would like to know whether it is possible to call or embed
> libraries
> that are created in C# .NET from matlab. I know it's possible to
> create NET libraries in matlab and reuse them in C#, but is it also
> possible do do it the other way? In the current version of matlab
> R2006 I only found a way to call ActiveX/COM objects but not NET
> libraries.
>
> Do you know if there's a way to do this.
>
> Thanks in advance
> Martin
|
|
|
|
|