[Mono-list] embedding mono and returning GList
Alan
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.
Alan
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().
>>
>> 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
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20110522/04caed6d/attachment.html
More information about the Mono-list
mailing list