[Gambas-user] VarPtr() on array syntax

Benoît Minisini gambas at ...1...
Tue Feb 17 23:20:58 CET 2015


Le 14/02/2015 15:19, Tobias Boege a écrit :
> Hi Benoit,
>
> in bug #589, comment #6, [0] you wrote that the C code
>
>    interface = PMD_Find_Inteface ( &hid[i], i, USB1608FS_PID);
>
> would translate to
>
>    Const USB1608FS_PID As Integer = &H007D& ' from usb_1608FS.h
>    ...
>    PMD_Find_Interface(VarPtr(Hid[I]), I, USB1608FS_PID)
>
> (Yes, we're still trying to solve this problem and the ones around it in the
>   German Gambas forum where it was initially posted.)
>
> But VarPtr() apparently cannot handle the array syntax used in its argument,
> as it "takes only one identifier". See attached script which also contains a
> good workaround.
>
> Regards,
> Tobi
>
> [0] https://code.google.com/p/gambas/issues/detail?id=589
>

Yes, of course. I don't know why I thought VarPtr() could be dynamic...

-- 
Benoît Minisini




More information about the User mailing list