[Kde-bindings] Qyoto: SIGNALS/SLOTS

Adam Treat treat at kde.org
Thu Dec 15 22:08:36 UTC 2005

On Thursday December 15 2005 3:59 pm, Richard Dale wrote:
> I'm not sure if it's a good idea to wrap a C++ IntPtr (RawObject) as a
> GCHandle, I don't think that's what it's for. A C++ instance should really
> be a 'void *' on the C/C++ side, and an IntPtr in C#. While a C# instance
> should be passed as a GCHandle from C# to the C/C++ side, and be a 'void *'
> there. Which is confusing, but when I typedef'd 'void *' as 'GCHandle' in C
> trying to make things clearer it messed up the marshalling.

That's what is going on in that file.  RawObject is an IntPtr.  The GCHandle 
is only for C# objects that need to be protected from garbage collection 
while playing in C/C++ land.

> -- Richard
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings

More information about the Kde-bindings mailing list