Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Delphi Created DLL's in Perl

Status
Not open for further replies.

aseuren

Programmer
Jun 5, 2003
1
AU
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??
 
Check your calling convention: we have 'pascal', 'cdecl', 'stdcall', etc.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top