Quantcast
Viewing all articles
Browse latest Browse all 1024

DLL call... almost there

@kepler wrote:

Good afternoon,

Finally, I'm able to be sure that my DLL is being called - the problem, I think, was the decorated names instead of undecorated.

Now, I face another problem: arrays. One of the parameters passed to my function (byref) is an array. Here's the prototype of the function:

function calc(tjd : double;
i : Integer;
flag : Longint;
var xx : double;
var sErr : String
): Longint; cdecl; external "mydll.dll" name 'calc';

I'm trying to call it like:

function TestDLL(void): Longint;
var
S: String;
xxy: array of double;
begin
Result := calc2(2451545,1,1,xxy[0],S);
end;

I get the message that the variable is not an array - I think it refers to xxy. I tryed to define xxy like

xxy: array[0..5] of Double

but I get a syntax error in the []. Tryed [6],[0.5], etc...

What am I missing here?...

Kind regards,

Kepler

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 1024

Trending Articles