I have some C# code I want to use from C++. One of the C# method's
parameters expects a COM interface (which was defined in a separate COM
component, which is used by both of my assemblies), but I can't seem to pass
a COM interface over to C# because I get error C2664:
cannot convert parameter 1 from 'DesignServicesLib::IDsCadCallbacks *'
to 'DesignServicesLib::DsCadCallbacks __gc *'
But a straight pointer is what the COM component gives me, so I'm stuck.
(Of course if the C# assembly called that COM method to obtain a C#
reference, it would just work, but that doesn't help me.)
Ideas?
Alan Baljeu - 13 Apr 2006 18:41 GMT
>I have some C# code I want to use from C++. One of the C# method's
>parameters expects a COM interface (which was defined in a separate COM
[quoted text clipped - 8 lines]
>
> Ideas?
If I replace using "foo.dll" with #import "foo.dll", this problem goes
away. What do you make of that?