Help. I have written a simple DLL to be used in a Pear program. Whenever a parameter is passed in from Perl, the DLL appear to recieve garbage. Example code in the DLL;
Function Min(X, Y : Integer) : Integer; Export;
begin
if x<y then
Result:=X
else
Result:=Y
end;
If from Perl we call this and pass X=2 and Y=4, the above function recieves x=2876544 and y=57689756 (or similar rubbish numbers).
What am I doing wrong??
Function Min(X, Y : Integer) : Integer; Export;
begin
if x<y then
Result:=X
else
Result:=Y
end;
If from Perl we call this and pass X=2 and Y=4, the above function recieves x=2876544 and y=57689756 (or similar rubbish numbers).
What am I doing wrong??