[Kde-bindings] Qyoto: SIGNALS/SLOTS

Richard Dale Richard_Dale at tipitina.demon.co.uk
Thu Dec 15 23:15:55 UTC 2005

On Thursday 15 December 2005 22:08, Adam Treat wrote:
> 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.
Sorry I've had another look, and you're right - it makes sense now.

-- Richard

More information about the Kde-bindings mailing list