Paradox Community

Items in pnews.paradox-programming

Subject:Re: DLL don't work (Delphi 10.3 Community Edition) 2 P9
Date:Mon, 3 Jun 2019 12:39:36 +1000
From:Leslie <"ViaThe List"@NOSPAM.com>
Newsgroups:pnews.paradox-programming
First I would use the Depends Utility to examine the DLL itself and make 
sure the Exported Functions are named as you want.

To prevent Name mangling you can declare the functions in the .def file 
(in Visual C/C++ that is) so that you avoid the @4 suffix for example.

Leslie.

On 2/06/2019 6:41 PM, Günter wrote:
> try to export a dll from Delphi 10.3 Community Edition to Paradox9:
> Embarcaderos "RAD STUDIO DX Delphi 10.3 Community Edition" has no
> restrictions for testing all functions, and i tested some variations in
> the dll, directives and other small things, but it do not work.
> any suggestions?
> (working on winX64, but dll only for Win32 compiled)
>
> Günter
>
> P9.code:
> var
>   ali longint
> endvar
> uses "U:\\Projekte\\20190601\\Win32\\Debug\\beepDLL.dll"
> 	MinXY(x longint,y longint)longint
> 	MaxXY(x longint,y longint)longint
> enduses
> method pushButton(var eventInfo Event)
>    ali=MinXY(3,5)
>    ali.view("MinXY")
> endMethod
>
> result:N/A
>
> Delphi.code:
> library beepDLL;
> uses
>   System.SysUtils,
>   System.Classes,
>   Winapi.Windows;
> {$R *.res}
> {$ALIGN 4}
> {$MINENUMSIZE 4}
> {$WEAKPACKAGEUNIT}
> function MinXY(X, Y: Integer): Integer; Stdcall;
> begin
>   if X < Y then MinXY := X else MinXY := Y;
> end;
> function MaxXY(X, Y: Integer): Integer; Stdcall;
> begin
>   if X > Y then MaxXY := X else MaxXY := Y;
> end;
> exports
>   MinXY index 1,
>   MaxXY index 2;
> begin
> end.
>

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Copyright © 2004 thedbcommunity.com