.NET Remoting
10 ビュー (過去 30 日間)
古いコメントを表示
Using Matlab 2011A, I need to access a remote app that exposes a .NET Remoting inteface.
Here's what I'm doing:
function ConnectRemoteApp()
NET.addAssembly('C:\work\MyCo.Remote.dll');
import MyCo.Remote.*
remoteApp = RemoteUtilities.GetRemoteApp('123.45.67.890');
result = remoteApp.AppName;
Note: Remote.dll contains: (1) implementation of static GetRemoteApp method which returns object implementing IRemoteApp interface (2) declaration of IRemoteApp interface which specifies AppName property
When I execute this function, Matlab says remoteApp has no methods or properties. I know the Remote.dll is good because I can use it from a C# client.
What am I missing?
Thank you.
4 件のコメント
Kaustubha Govind
2011 年 9 月 6 日
Are you able to use other .NET libraries? For example, from the documentation:
NET.addAssembly('System.Speech')
speak = System.Speech.Synthesis.SpeechSynthesizer;
speak.Volume = 100;
speak.Speak('This is a test')
Pierre
2011 年 9 月 6 日
If you can use other .Net libraries successfully, you might want to check which *.cfg file is being used in a MATLAB context... I'm no more sure about this since I used .Net Remoting quite some time ago, but isn't the connection properties, layers, protocols, contracts, etc. configured according to a config file "next to" the application assembly, so using the same library from a different context (in particular MATLAB instead of a test client application with the correct connection properties) might read property settings from a different source.
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!