[Mono-list] embedding mono and returning GList

Nils Andresen nils at nils-andresen.de
Sun May 22 14:52:23 EDT 2011


2011/5/22 Robert Jordan <robertj at gmx.net>:
> You must unbox the returned object. See mono_object_unbox().
>
> Robert

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 wrong.
Do I have to unbox the content, too? (Content is strings in this case)

Nils


More information about the Mono-list mailing list