--------------------------------------------
Here is how I convert my units to DLL’s
--------------------------------------------
Unit RsrFMgmt;
Interface
uses
ShareMem,
SysUtils;
function Func1(Var p1,p2,p3 : String) : Boolean;
function Func2(a,b : Integer; Var c,d : Integer) : boolean;
Implementation
function Func1(Var p1,p2,p3 : String) : Boolean;
begin
.
.
.
end;
function Func2(a,b : Integer; Var c,d : Integer) : boolean;
begin
.
.
.
end;
end.
-------------------------------------------------------------------
Converting the above unit to a DLL is as follows:
-------------------------------------------------------------------
library RsrFMgmt;
uses
ShareMem,
SysUtils;
function Func1(Var p1,p2,p3 : String) : Boolean; Export;
begin
.
.
.
end;
function Func2(a,b : Integer; Var c,d : Integer) : boolean; Export;
begin
.
.
.
end;
Exports Func1 Index 1,
Func2 Index 2;
begin
end.
---------------------------------------------
Store your compiled DLL in the
Windows system directory.
A new unit needs to be written to access your DLL’s within your program.
---------------------------------------------
Unit UsingDLLs;
Interface
uses
ShareMem,
SysUtils;
function Func1(Var p1,p2,p3 : String) : Boolean;
function Func2(a,b : Integer; Var c,d : Integer) : boolean;
Implementation
function Func1(Var p1,p2,p3 : string) : boolean; External 'RsrFMgmt' Index 1;
function Func2(a,b : integer; var c,d : integer) : boolean; External 'RsrFMgmt' Index 2;
end.
---------------------------------------------------------------
Hope this helps. Good luck!
---------------------------------------------------------------