<div class="gmail_quote">sorry...now it goes in English...<br><br>I have a problem trying to invoke a function through FFI. I have bee using FFI y some functions with no problem but now I have &quot;could not coerce arguments&quot;. This is the first time I have a void* parameter, so I believe that could be the problem.<br>

<br>The function definition is:<br><pre>int <b>odbx_set_option</b>(<br>    odbx_t* <i><b>handle</b></i>,<br>    unsigned int <i><b>option</b></i>,<br>    void* <i><b>value</b></i> )<br><br><br><font size="4">Here is an example that shows how to use it in C:</font><br>

<br>option = ODBX_TLS_ALWAYS;<br>if( ( err = odbx_set_option( handle, ODBX_OPT_TLS, (void*) &amp;option ) ) &lt; 0 )<br>{<br>    fprintf( stderr, &quot;odbx_set_option(): %s\n&quot;, odbx_error( handle, err ) );<br>    odbx_finish( handle );<br>

    return err;<br>}<br><br></pre><br>This is my method that map that function with FFI:<br><br>apiSetOption: handle option: anOption value: aValue<br>&nbsp;&nbsp;&nbsp; &quot;int odbx_unbind(odbx_t*)&quot;<br>&nbsp;&nbsp;&nbsp; &lt;cdecl: long &#39;odbx_set_option&#39; (ulong ulong void*) module: &#39;opendbx&#39; &gt;<br>

&nbsp;&nbsp;&nbsp; ^self externalCallFailed<br>&nbsp;&nbsp;&nbsp; <br><br>I proobed void*, void, ulong y ulong* but I had that error in all cases.<br><br>Here is how my method is used:<br><br>err := OpenDBX apiSetOption: self option:32&nbsp; value:1. <br>

<br>So, can someone help me?<br><br>thanks,<br><font color="#888888"><br>
mariano<br>
</font></div><br>