[Scilab-users] Interfacing to third party DLLs

antoine.elias at scilab-enterprises.com antoine.elias at scilab-enterprises.com
Thu Jan 19 10:00:56 CET 2017


Hello James,

inputs arguments of your interface must be pointers, Scilab manage data 
as matrix ( arrays in C )
So a scalar variable `A` become a `double A[1];`

prototype must be like this :
void Add(double* a, double* b, double* c);


I made some changes is yours files, take a look, I hope that can help 
you.

Antoine

Le 2017-01-18 22:38, James Holland a écrit :
> I've spent some time on this and I still can't get this to work. I've 
> created
> a very simple 64-bit dll  to allow me to experiment with this but to no
> avail. All my DLL consists of is two functions, one that adds two 
> doubles
> and returns a double and one that subtracts a double from another 
> double and
> returns a double. When I try to add a=4, b=2 I get a nonsense answer 
> that
> changes every time. Also ulink doesn't work at all nor does dllinfo 
> although
> I can examine the dll using dumpbin.
> 
> 
> TestDLL1.zip 
> <http://mailinglists.scilab.org/file/n4035379/TestDLL1.zip>
> TestDLL1.sce 
> <http://mailinglists.scilab.org/file/n4035379/TestDLL1.sce>
> 
> 
> 
> --
> View this message in context:
> http://mailinglists.scilab.org/Scilab-users-Interfacing-to-third-party-DLLs-tp4035330p4035379.html
> Sent from the Scilab users - Mailing Lists Archives mailing list
> archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DLLtest1.cpp
Type: text/x-c
Size: 175 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20170119/cfb9df84/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DLLtest1.h
URL: <https://lists.scilab.org/pipermail/users/attachments/20170119/cfb9df84/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testDLL.sce
Type: text/x-fortran
Size: 521 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20170119/cfb9df84/attachment-0001.bin>


More information about the users mailing list