<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello James,<br>
      <br>
      Le 07/01/2017 23:01, James Holland a écrit :<br>
    </div>
    <blockquote
cite="mid:AM5PR0901MB15568AA66655E37268F6C9EF9C620@AM5PR0901MB1556.eurprd09.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;"
        dir="ltr">
        <p>I'm new to Scilab but I have some experience with MATLAB. I'm
          trying to port some code that calls functions in a third party
          DLL. From what I've read I can't do this if the function
          returns a value however that article was a couple of years
          old, </p>
      </div>
    </blockquote>
    <br>
    It would be interesting to have a pointer to this article. It looks
    very unlikely, or even wrong.<br>
    A requirement indicated in Scilab documentation is about the calling
    convention:<br>
    <small><tt>--> uman call d<br>
        <br>
      </tt><tt></tt><tt>Limitations to Shared Library Support</tt><tt><br>
      </tt><tt>-------------------------------------</tt><tt><br>
      </tt><tt>.../...</tt><tt><br>
      </tt><tt> Scilab shared library interface (call function) supports
        only C and fortran libraries</tt><tt><br>
      </tt><tt> routines.</tt><tt><br>
      </tt><tt> In others cases, we recommend to use api_scilab
        interfaces.<br>
        <br>
      </tt><tt></tt><tt> Troubleshooting Shared Library Applications
        (Windows)</tt><tt><br>
      </tt></small><small><tt><small><big><tt> 
              ----------------------------------------------------</tt></big><tt><big><br>
            </big>  </tt></small>Some shared libraries, compiled as
        Microsoft Windows 32 or 64 bit libraries, use a</tt><tt><br>
      </tt><tt> calling convention that is incompatible with the default
        Scilab calling convention.</tt><tt><br>
      </tt><tt> <font color="#009900">The default calling convention for
          Scilab and for Microsoft C and C++ compilers is</font></tt><font
        color="#009900"><tt><br>
        </tt></font><tt><font color="#009900"> cdecl</font>.</tt><tt><br>
      </tt><tt> For more information, see the MSDNŽ Calling Conventions
        and Wikipedia articles.</tt><tt><br>
      </tt></small><br>
    For a broader overview : <small><small><small><a class="moz-txt-link-freetext" href="https://help.scilab.org/docs/6.0.0/en_US/section_eb691bc0a443eb3a95bc5db4d1be2102.html">https://help.scilab.org/docs/6.0.0/en_US/section_eb691bc0a443eb3a95bc5db4d1be2102.html</a></small></small></small><br>
    <br>
    HTH<br>
    Samuel Gougeon<br>
    <br>
  </body>
</html>