Hello all,
I'm working on porting an application from Delphi to Lazarus, and that involves porting a few custom components I wrote as well.
One of those components is giving me a major headache. It's a component that wraps around a set of C-implemented functions from a vendor DLL which allow for communications between systems (probably not familiar to most, it's called HDX from Avaya). The details shouldn't be important: it's a set of functions which I've declared as
cdecl; external "dll_name.dll";
and they get structured together by the component, so when I invoke the component's method "Inicializa" a sequence of functions is called to connect to a server and set up a listening channel which then receives connections.
Well, that all works flawlessly when compiled on Delphi. Lazarus compiles it fine as well, but when I run a Lazarus program using the component I get an
External: ? error (not on the first DLL function, but on the second!).
I can't control this exception even through a try..except block. I tried using the component from the pallette, creating it dynamically - no difference.
I'm using Lazarus 1.8 with FPC 3.0.4.
I tried using different $PACKRECORDS, $PACKENUM and $OPTIMIZATION settings, to no avail.
Could anyone help me?
Thanks!