<div dir="ltr"><div>Take a look at <a href="https://msdn.microsoft.com/pl-pl/library/vstudio/7dz62kfh(v=vs.110).aspx">https://msdn.microsoft.com/pl-pl/library/vstudio/7dz62kfh(v=vs.110).aspx</a> (it suggests a cvtres.exe tool)</div><div><br></div><div>Ask to fpc guru if is possible to use manually an different linker like <a href="http://www.digitalmars.com/ctg/optlink.html">http://www.digitalmars.com/ctg/optlink.html</a></div><div><br></div>In the end, i would try to compile a delphi dll and access it in fpc. <div><br></div><div>Another try (don't know if is possible) is to use delphi to compile <span style="font-size:12.8000001907349px">spromeps.pas</span> as a obj in COFF<div><br></div><div>Luiz</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-23 15:50 GMT-03:00 Luca Olivetti <span dir="ltr"><<a href="mailto:luca@wetron.es" target="_blank">luca@wetron.es</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El 23/06/15 a les 20:38, Bo Berglund ha escrit:<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, 23 Jun 2015 18:30:46 +0200, Luca Olivetti <<a href="mailto:luca@wetron.es" target="_blank">luca@wetron.es</a>><br>
wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
El 23/06/15 a les 17:51, Bo Berglund ha escrit:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The problem is most likely in the conversion because even the smallest<br>
test application throws an exception on the very first call into the<br>
driver, the initialization of the Api data interface array.<br>
</blockquote>
<br>
Or in the calling convention<br>
<br>
<a href="http://freepascal.org/docs-html/prog/progse22.html#x174-1770006.3" rel="noreferrer" target="_blank">http://freepascal.org/docs-html/prog/progse22.html#x174-1770006.3</a><br>
<br>
you can try and define the external as stdcall or if that fail try cdecl<br>
(though I'm not sure the default is different than delphi).<br>
</blockquote>
<br>
STDCALL has been there "forever" (since about 2002)...<br>
</blockquote>
<br></span>
You could try cdecl then (though I doubt it will make a difference).<span class="im HOEnZb"><br>
<br>
Bye<br>
-- <br>
Luca Olivetti<br>
Wetron Automation Technology <a href="http://www.wetron.es/" rel="noreferrer" target="_blank">http://www.wetron.es/</a><br>
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007<br>
<br></span><div class="HOEnZb"><div class="h5">
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" rel="noreferrer" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</div></div></blockquote></div><br></div>