[Mono-list] embedding mono and returning GList

Nils Andresen nils at nils-andresen.de
Sun May 22 15:42:13 EDT 2011


2011/5/22 Alan <alan.mcgovern at gmail.com>:
> Print out the value of the 'Handle' property in your c# code before the
> method returns and then print the value you get in native after you unbox.
> If they're not the same value you're done something wrong. Give that a shot
> and see what happens. Maybe it'll help you diagnose the issue.

Thanks for the tip.
After trying many things. I found that when unboxing the return value like this:
> long * l = *(long *)mono_object_unbox(o);
the value of l contains the Adress of the GLib.List handle from the
managed-side.
So now I'm stuck. what do I do with that number? Can I "generate" a
GList from that value (seems my "c" is not good enough..)

Nils


More information about the Mono-list mailing list