你在dll中定义这样的函数:Procedure ExChanageParams(var xx,bb,.......);<br>{-----------------------下面是我的代码----------------------------------------}<br> procedure ExChanageParams(var xxx,bbb : Integer);<br> begin<br> ShowMessage(IntToStr(xxx)+','+inttostr(bbb));<br> xxx := 20;<br> bbb := 21;<br> end;<br><br> exports<br> ExChanageParams;<br>{-----------------------------------------------------}<br>var<br>a, b : integer;<br> procedure ExChanageParams(var xxx,bbb : Integer); external 'project2.dll';<br>implementation<br>{$R *.dfm}<br>procedure TForm1.btn1Click(Sender: TObject);<br>begin<br> a := 10;<br> b := 11;<br> ExChanageParams(a, b);<br>end;<br>procedure TForm1.btn2Click(Sender: TObject);<br>begin<br> ShowMessage(IntToStr(a) +','+inttostr(b));<br>end;