<div dir="ltr"><br><br><div class="gmail_quote">On Mon, May 26, 2008 at 10:44 AM, Mariano Martinez Peck <span dir="ltr"><<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div class="Ih2E3d">On Mon, May 26, 2008 at 10:36 AM, Bert Freudenberg <<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
On 26.05.2008, at 15:21, Mariano Martinez Peck wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
"could not coerce arguments"<div><br>
int odbx_set_option(<br>
odbx_t* handle,<br>
unsigned int option,<br>
void* value )<br></div><div>
apiSetOption: handle option: anOption value: aValue<br>
"int odbx_unbind(odbx_t*)"<br>
<cdecl: long 'odbx_set_option' (ulong ulong void*) module: 'opendbx' ><br>
^self externalCallFailed<br>
<br></div><div>
err := OpenDBX apiSetOption: self option:32 value:1.<br>
</div></blockquote>
<br>
<br>
The first argument appears to be a pointer to a handle object. You probably should not declare that as ulong if you then pass "self" (which I assume is a ExternalStructure subclass). But that depends on how you acquire the handle, and how you represent it in the image.<br>
</blockquote></div><div><br>Yes you are right, sorry. It was not self, but a attribute called handle. My mistake.<br> </div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
The argument to void* should be a ByteArray or WordArray, methinks, I'd try "WordArray with: 1" if you want to pass a pointer to the Integer 1.<br><font color="#888888">
<br>
- Bert -<br>
</font></blockquote></div><div><br>Sounds interesting. I will test it and then I tell you.<br><br></div></div></blockquote><div><br><br>Bert: I test this using WordArray and I work perfect in all the cases the value was a number. But the type in the function definition is void*. So, now, I need to send not only a 1 or 0, but a String. In this case, I cannot do WordArray with: 'aStringValue' neither ByteArray with: 'aStringValue' . What can I do in this case? Do you have any idea?<br>
<br>I mean, I need to use the same parametrer void*, sending it a number or a string. <br><br>many thanks,<br><br>mariano<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div>Thanks,<br><br>Mariano<br><br> </div></div><br>
</blockquote></div><br></div>