Ivo, Both RCWs and CCWs should be working in mono. Please post more details of the issues you are hitting. I am using both RCWs and CCWs extensively in my applications.
The InterfaceType attribute is interesting. I believe interfaces are dual by default (IDispatch based with a vtable), so if your interfaces really are dual this should work. Thanks, Jonathan On Tue, Apr 26, 2011 at 4:47 PM, Ivo Smits <i...@ufo-net.nl> wrote: > In Mono COM/XPCOM interop, Runtime Callable Wrappers appear to be > implemented and work correctly with VirtualBox, although it's not > directly compatible with COM interop in the Microsoft .Net runtime: the > interop assemblies generated by VS.Net cause crashes (segmentation > fault) and for interfaces written in C#, Mono needs the > [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] attribute on the > interfaces, while this attribute breaks the interface in MS .Net. If > anyone has more information, or would like to have more information, let > me know. For now, I will work around this by using different, equally > named interop assemblies exposing the same interfaces. > > I have not been able to get COM Callable Wrappers to work yet. I can get > an IUnknown interface pointer for the managed object (using > Marshal.GetIUnknownForObject), I can use Marshal.AddRef on this pointer, > and I can pass this pointer to the COM code. Presumably when the COM > code makes a call on the CCW interface, a segmentation fault occurs. > This is still pretty much a black box for me, so before I investigate > any further: have CCWs been implemented in Mono and are they supposed to > work? Has anyone successfully used them? > > The stack trace of the crash is short and not very useful: > Native stacktrace: > > Segmentatiefout > > -- > Ivo > _______________________________________________ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list >
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list