[Scilab-users] Linking DLL from MS Visual C++ to SciLab.

Chuox chuox.bece at gmail.com
Fri Feb 21 19:31:36 CET 2014


Using a third-party DLL in SciLab might be tricky.
I had a problem linking EPANET toolkit library, what i did was create a dll
to call the epanet2.dll (the library form EPANET) and return the values in
SciLab. Maybe is not the best solution and there is a better way, but i
didn't find it.
This is and example of how i did it:

/////The C code/////
#include <string.h>
#include "epanet2.h"
int SetLinkValue(int *index, int *param, float *Val, int *errcode )
{
*errcode=ENsetlinkvalue(*index, *param, *Val);
return (*errcode);
}

/////SciLab Code/////
//Link the dll used to cal the external dll
unSetLink=link(Ubicacion+"enlace.dll","SetLinkValue","c");

//This return and error
[err]=call("SetLinkValue",TubIndex,1,"i",0,2,"i",diametro,3,"r","out",[1,1],4,"i");



--
View this message in context: http://mailinglists.scilab.org/Scilab-users-Linking-DLL-from-MS-Visual-C-to-SciLab-tp4028800p4028813.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list