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