Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Reference Index > Using the DLCALL Function > Examples

Delphi

Scroll Prev Top Next More

Example of a DLL created in Delphi exporting three functions:

 

// Begin Dll Code

library DemoLib;

 

uses

 SysUtils, Classes;

 

{$R *.res}

 

function MultInt (NumIN : Integer) : Integer; stdcall;

begin

 Result := (NumIN * 2);

end;

 

function MultDbl (NumDbl : Double) : Double; stdcall;

begin

 Result := (NumDbl * 2);

end;

 

procedure LCaseByREF(DataIN : PChar); stdcall;

begin

 ansiStrLower(DataIN);

end;

 

function LCaseByVAL (DataIN : PChar) : PChar; Stdcall;

begin

 Result := ansiStrLower(DataIN);

end;

 

Exports MultInt, LCaseByREF, LCaseByVAL;

 

begin

 

end.

// End Dll Code