Error while instantiating MATLAB Engine Interface through COM (Matlab C# Integration) -


i have called matlab functions c# using com objects. runs on multiple calls gives exception while instantiating matlab engine interface through com.

//for instantiating matlab engine interface through com

    mlapp.mlappclass matlab = new mlapp.mlappclass(); 

exception gives:

unable cast com object of type 'mlapp.mlappclass' interface type 'mlapp.dimlapp'. operation failed because queryinterface call on com component interface iid '{669cec93-6e22-11cf-a4d6-00a024583c19}' failed due following error: rpc server unavailable. (exception hresult: 0x800706ba).

i'm unable figure out. appreciated.

i had same problem. using 2 private functions, creating 2 different matlab objects inside functions. made matlab object global problem solved(as below). problem might not same.

 public partial class form1 : form  {         #region ----> global variables         // create matlab instance          mlapp.mlapp matlab = new mlapp.mlapp(); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -