Using COM classes
-
I tried to do some C# for the first time and decided to try and use one of my C++ COM classes from it. Using the class from C# gives this definition of a method. MyInterface1.A(out MyInterface2 ppIFace) Trying to call it as this will fail with a syntax error. MyInterface2 IFace2; MyInterface1 IFace1; IFace1.A(IFace2) How do i call this method from C# ? /Magnus
- I don't necessarily agree with everything I say
-
I tried to do some C# for the first time and decided to try and use one of my C++ COM classes from it. Using the class from C# gives this definition of a method. MyInterface1.A(out MyInterface2 ppIFace) Trying to call it as this will fail with a syntax error. MyInterface2 IFace2; MyInterface1 IFace1; IFace1.A(IFace2) How do i call this method from C# ? /Magnus
- I don't necessarily agree with everything I say
With C# you'll have to specify if a parameter is a
ref
orout
parameter not only at the method declaration but at every call. So writingIFace1.A(out IFace2);
should do the trick. Regards, mav
-
With C# you'll have to specify if a parameter is a
ref
orout
parameter not only at the method declaration but at every call. So writingIFace1.A(out IFace2);
should do the trick. Regards, mav