I mean, change &#39;enumerator&#39; to &#39;mono_object_unbox(enumerator)&#39;.<div><br></div><div>                 Zoltan<br><br><div class="gmail_quote">On Tue, Apr 5, 2011 at 10:24 AM, Zoltan Varga <span dir="ltr">&lt;<a href="mailto:vargaz@gmail.com">vargaz@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br></div><div>  In this line:</div><div><br></div><div><div>        printf (&quot;%u\n&quot;, *(bool*)mono_object_unbox( mono_runtime_invoke (moveNext, enumerator,</div>
<div>                                                        NULL, NULL)));</div>
<div><br></div><div>You probably have to change &#39;moveNext&#39; to &#39;mono_object_unbox(moveNext)&#39;.</div><div><br></div><font color="#888888"><div>           Zoltan</div></font><div><div></div><div class="h5"><br>
<div class="gmail_quote">On Tue, Apr 5, 2011 at 10:05 AM, Viktor Hermansson <span dir="ltr">&lt;<a href="mailto:viktor.hermansson@gmail.com" target="_blank">viktor.hermansson@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Mon, 4 Apr 2011 15:37:07 +0200<br>
Zoltan Varga &lt;<a href="mailto:vargaz@gmail.com" target="_blank">vargaz@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt;   Enumerator is probably a valuetype, and those have to be unbox-ed<br>
&gt; before passing them to mono_runtime_invoke ().<br>
&gt;<br>
&gt;                        Zoltan<br>
<br>
</div>If I do that it can&#39;t find the MoveNext()-method, so that&#39;s probably<br>
not the issue or did I misinterpret your idea?<br>
<font color="#888888"><br>
/Viktor<br>
</font><div><div></div><div><br>
&gt;<br>
&gt; On Mon, Apr 4, 2011 at 2:10 PM, viktor.hermansson &lt;<br>
&gt; <a href="mailto:viktor.hermansson@gmail.com" target="_blank">viktor.hermansson@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; I have a problem to use an Enumerator in the unmaneged world.<br>
&gt; &gt;<br>
&gt; &gt; When I execute MoveNext() it doesn&#39;t return the expected value<br>
&gt; &gt; (true).<br>
&gt; &gt;<br>
&gt; &gt; example code:<br>
&gt; &gt; (an extension to Roberts code here:<br>
&gt; &gt; <a href="http://go-mono.com/forums/#nabble-td1538089" target="_blank">http://go-mono.com/forums/#nabble-td1538089</a>)<br>
&gt; &gt;<br>
&gt; &gt; c++-code:<br>
&gt; &gt; <a href="http://pastebin.com/aMHmnHRC" target="_blank">http://pastebin.com/aMHmnHRC</a><br>
&gt; &gt;<br>
&gt; &gt; c#-code:<br>
&gt; &gt; <a href="http://pastebin.com/MpktHBTB" target="_blank">http://pastebin.com/MpktHBTB</a><br>
&gt; &gt;<br>
&gt; &gt; platform:<br>
&gt; &gt; Linux 2.6.38 64bit<br>
&gt; &gt; Mono git snapshot and 2.10.1<br>
&gt; &gt; GCC 4.6.0<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; View this message in context:<br>
&gt; &gt; <a href="http://mono.1490590.n4.nabble.com/Embedded-GetEnumerator-on-a-List-int-tp3425288p3425288.html" target="_blank">http://mono.1490590.n4.nabble.com/Embedded-GetEnumerator-on-a-List-int-tp3425288p3425288.html</a><br>


&gt; &gt; Sent from the Mono - Dev mailing list archive at Nabble.com.<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Mono-devel-list mailing list<br>
&gt; &gt; <a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a><br>
&gt; &gt; <a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
&gt; &gt;<br>
<br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>