Re: Datatypes do not work when calling an external DLL procedure
Date: 18 Aug 1998 12:21:09 GMT
Message-ID: <01bdca89$41d832a0$2f684691_at_w104-047>
Hello,
I think the problem is that there is a difference in the declaration on the
Delphi and Oracle side.
Try changing the calling convention in the Delphi-part from stdcall to
pascal. This causes that the parameters are passed in the reverse order. I
am not shure if this solves the problem but it is worth trying it
Regards
Jos Wolters
Mel Christie <mel_at_puregoodness.com> schreef in artikel
<01bdc9ef$b700eda0$7a78e8c3_at_mc-compaq>...
> I am trying to call a DLL procedure written in Delphi with the
> specification:
> procedure SLMessageDlg(const Code: word); stdcall; export;
> The Oracle 8 package has the specification:
> PROCEDURE SLMessageDlg(Code IN NUMBER)
> AS EXTERNAL LIBRARY lib_scilink
> NAME "SLMessageDlg"
> CALLING STANDARD PASCAL
> PARAMETERS(Code);
> However whenever I call SLMessageDlg the number displayed in a message
box
> is wrong (eg when the number 'Code' is 1 it actually displays 51800 !!!)
> What am I doing wrong?
>
> Regards
>
> Mel Christie
>
>
Received on Tue Aug 18 1998 - 14:21:09 CEST