[Scilab-users] Interfacing to third party DLLs

James Holland j_holland at msn.com
Mon Jan 9 20:42:51 CET 2017


OK that helps, thank you. I'm now struggling with the data types, I'm
currently trying to interface to the FTDI D2XX DLL but I have several other
scripts that I will also need to port to Scilab.

The function call is: FT_STATUS FT_CreateDeviceInfoList (LPDWORD
lpdwNumDevs)

where FT_Status is a double and lpdwNumDevs is a long pointer. In matlab I
used a libpointer but I can't find a good example of how to do this in
Scilab. Should I be using a pointer from the API_Scilab? the example seems
to be for a C routing calling a Scilab function, not the other way round. My
code at present is:

ft_status=0;
NumDevices = 0;
x = call("FT_CreateDeviceInfoList", NumDevices, 1, "d", "out",
ft_status,1,"d");

I get the error message 
"call: Wrong type for argument #8: Real or complex matrix expected at line
21 of exec file called by :    
exec('C:\Users\RhinoPower\Documents\Scilab\FTDI\FTDI_Test_OK.sce', -1)"

I would have thought that #8 would be the second "d" but surely its more
likely to be complaining about the lack of a pointer.
Regards
James





--
View this message in context: http://mailinglists.scilab.org/Scilab-users-Interfacing-to-third-party-DLLs-tp4035330p4035337.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list