Re: [Mono-dev] [Embedded] GetEnumerator on a Listint

2011-04-05 Thread Viktor Hermansson
On Mon, 4 Apr 2011 15:37:07 +0200 Zoltan Varga var...@gmail.com wrote: Hi, Enumerator is probably a valuetype, and those have to be unbox-ed before passing them to mono_runtime_invoke (). Zoltan If I do that it can't find the MoveNext()-method, so that's probably

Re: [Mono-dev] [Embedded] GetEnumerator on a Listint

2011-04-05 Thread Zoltan Varga
Hi, In this line: printf (%u\n, *(bool*)mono_object_unbox( mono_runtime_invoke (moveNext, enumerator, NULL, NULL))); You probably have to change 'moveNext' to 'mono_object_unbox(moveNext)'. Zoltan On Tue, Apr 5, 2011

Re: [Mono-dev] [Embedded] GetEnumerator on a Listint

2011-04-05 Thread Zoltan Varga
I mean, change 'enumerator' to 'mono_object_unbox(enumerator)'. Zoltan On Tue, Apr 5, 2011 at 10:24 AM, Zoltan Varga var...@gmail.com wrote: Hi, In this line: printf (%u\n, *(bool*)mono_object_unbox( mono_runtime_invoke (moveNext, enumerator,

Re: [Mono-dev] [Embedded] GetEnumerator on a Listint

2011-04-05 Thread Viktor Hermansson
On Tue, 5 Apr 2011 10:24:43 +0200 Zoltan Varga var...@gmail.com wrote: I mean, change 'enumerator' to 'mono_object_unbox(enumerator)'. Zoltan Thank you! That solved the problem. / Viktor ___ Mono-devel-list mailing list

[Mono-dev] [Embedded] GetEnumerator on a Listint

2011-04-04 Thread viktor.hermansson
I have a problem to use an Enumerator in the unmaneged world. When I execute MoveNext() it doesn't return the expected value (true). example code: (an extension to Roberts code here: http://go-mono.com/forums/#nabble-td1538089) c++-code: http://pastebin.com/aMHmnHRC c#-code:

Re: [Mono-dev] [Embedded] GetEnumerator on a Listint

2011-04-04 Thread Zoltan Varga
Hi, Enumerator is probably a valuetype, and those have to be unbox-ed before passing them to mono_runtime_invoke (). Zoltan On Mon, Apr 4, 2011 at 2:10 PM, viktor.hermansson viktor.hermans...@gmail.com wrote: I have a problem to use an Enumerator in the unmaneged