[Mono-list] embedding mono and returning GList
alan.mcgovern at gmail.com
Sun May 22 15:16:47 EDT 2011
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.
On 22 May 2011 19:52, "Nils Andresen" <nils at nils-andresen.de> wrote:
> 2011/5/22 Robert Jordan <robertj at gmx.net>:
>> You must unbox the returned object. See mono_object_unbox().
> Yes, I tried that, too.
> The code looks like this:
>> MonoObject *o = mono_runtime_invoke (method, instance, NULL, &ex);
>> GList *list = (GList *)mono_object_unbox (o);
> The resulting GList contains 2 Elements, not 4 and the contents is all
> Do I have to unbox the content, too? (Content is strings in this case)
> Mono-list maillist - Mono-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list