[Mono-list] gtk-sharp problem

Dietmar Maurer dietmar@ximian.com
22 Jul 2002 07:54:31 +0200

On Sun, 2002-07-21 at 06:14, Mike Kestner wrote:
> On Sat, 2002-07-20 at 11:58, Dietmar Maurer wrote:
> > button.exe does not work because gdk calls our callback:
> > 
> >  boolObjectEventAnyCallback(IntPtr arg0, Gdk.EventAny arg1, int key)
> > 
> > with a correct Gdk.EventAny struct, but the managed code assumes:
> Okay, technically, gdk calls us with a GdkEventAny*.  Is it possible
> that the real issue here is that we're trying to demarshal the entire
> type off the stack instead of just a reference to it?


> With value types, do we need to specify the parameter as ref
> Gdk.EventAny in the PInvoke declaration, perhaps?

sure, if it passes a pointer you have to use GdkEventAny*.

- Dietmar