//dll source<br>library mysum;<br>uses<br> SysUtils, Classes;<br> function makeasum(f:integer;s:integer):integer;export;<br> begin<br> makeasum:=f+s;<br> end;<br><br>exports<br> makeasum;<br>end.<br><br>// use dll<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Edit1: TEdit;<br> Edit2: TEdit;<br> Edit3: TEdit;<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br>function makeasum(f:integer;s:integer):integer;far;external 'mysum';<br><br>{$R *.DFM}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br> edit3.text:=inttostr(makeasum(strtoint(edit1.text),strtoint(edit2.text)));<br>end;<br><br>end.<br>