RXL, вот листовка, решил попробовать длл написать. ее я взял из книжки по дельфи.
unit Unit1;
interface
uses
Windows, ShareMem, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Edit7: TEdit;
Edit8: TEdit;
Edit9: TEdit;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function AddIntegers(a,b:integer):integer;
external 'project2.dll'
function AddReals(c,d:real):real;
external 'project2.dll'
function AddStringsFromDll(e,f:string):string;
external 'project2.dll'
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit7.Text:=IntToStr(AddIntegers(StrToInt(edit1.Text),StrToInt(Edit2.Text)));
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Edit8.Text:=FloatToStr(AddReals(StrToFloat(edit3.Text),StrToFloat(edit4.Text)));
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Edit9.Text:=AddStringsFromDll(edit5.Text,edit6.Text);
end;
end.