开发者

Matlab and .NET Interaction

开发者 https://www.devze.com 2023-01-01 07:35 出处:网络
I\'m having an issue interacting between M开发者_JS百科atlab and .NET. I\'ve managed to call .NET methods from Matlab code and vice versa. However, if I call a .NET method that, in turn, instantiates

I'm having an issue interacting between M开发者_JS百科atlab and .NET. I've managed to call .NET methods from Matlab code and vice versa. However, if I call a .NET method that, in turn, instantiates a Matlab object, it crashes (with a type initialization exception).

Think about this scenario: a .NET assembly is interacting with a Matlab dll that was deployed for .NET (not native) by Matlab's deploytool. Now, when I'm loading the above .NET dll in a Matlab program everything is ok until I run a method that utilizes the other Matlab dll. Only then everything crashes.

The exact message is:

Warning: Cannot initialize MATLAB Compiler-generated software component in MATLAB. MATLAB Compiler-generated software components cannot be used from within MATLAB.

Please don't offer not to use Matlab-.NET-Matlab architecture, it's not an option.

Thank you very much (I promise to accept the answer that solves the problem :-)),

Yaron.

0

精彩评论

暂无评论...
验证码 换一张
取 消