[Mono-list] embedding mono and returning GList
robertj at gmx.net
Sun May 22 15:18:18 EDT 2011
On 22.05.2011 19:52, Nils Andresen 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);
mono_object_unbox() returns a pointer to your intptr, so you
have to dereference it:
GList *list = *(GList**)mono_object_unbox (o);
More information about the Mono-list