Hi All,
I'm trying to developp an application in C# but I can't create an instance of ISMIPath.
this command doesn't work:
ISMIPath myPathInterface = new ISMIPath();
How can I make an instance? How works the constructor? (if there is one...)
The VBClient sample cannot be simply converted.
' Create SMIHost object and interfaces
CommInterface = New INTEGMOTORINTERFACELib.SMIHost
PathInterface = CommInterface
Thanks for your help
Kind regards
lionel
Hi Lionel,
Please try the following...
SMIHostClass Host2 = new
INTEGMOTORINTERFACELib.SMIHostClass();
Host2.EndSpeed = 1000;
Hi,
My problem is not to creat a SMIHost object, my problem is to create a ISMIPath object.
I can declare a ISMIPath object but I cannot make an Instance of this object.
ISMIPath myPathInterface; // Works
myPathInterface= new ISMIPath(); // Doesn't work
An SMIHost object is an ISMIPath object. You should be able to just assign an SMIHost to an ISMIPath typed variable. An interface works something like a superclass.