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 at 10:05 AM, Viktor Hermansson < viktor.hermans...@gmail.com> wrote: > 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 > not the issue or did I misinterpret your idea? > > /Viktor > > > > > 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 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: > > > http://pastebin.com/MpktHBTB > > > > > > platform: > > > Linux 2.6.38 64bit > > > Mono git snapshot and 2.10.1 > > > GCC 4.6.0 > > > > > > > > > > > > -- > > > View this message in context: > > > > http://mono.1490590.n4.nabble.com/Embedded-GetEnumerator-on-a-List-int-tp3425288p3425288.html > > > Sent from the Mono - Dev mailing list archive at Nabble.com. > > > _______________________________________________ > > > Mono-devel-list mailing list > > > Mono-devel-list@lists.ximian.com > > > http://lists.ximian.com/mailman/listinfo/mono-devel-list > > > > >
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list