//////////////////<br>library RkModule;<br><br>uses<br> Forms,<br> Func in 'Func.pas';<br><br>exports<br> RK index 1 name 'RK';<br>begin<br>end.<br>///////////////////<br>unit Func;<br><br>interface<br><br>uses<br> forms,SysUtils,Classes, dbtables,RkSel,Rkl,RKb;<br><br>Function RK(AliasName,UserName,Password:String;HWD:integer;Personid:string):integer;export;<br><br>var<br> CurrentPersonID,CurrentPersonName,DefaultSourceLibId,DefaultSourceLibName:String;<br><br>implementation<br><br>Function RK(AliasName,UserName,Password:String;HWD:integer;Personid:string):integer;export;<br>begin<br> try<br> Application.handle:=HWD;<br> Application.CreateForm(TForm_Buy, Form_Buy);<br> Application.CreateForm(TForm_rk, Form_rk);<br> Application.CreateForm(TForm2, Form2);<br> Form_buy.Database1.AliasName:=Uppercase(AliasName);<br> Form_buy.Database1.Params.Clear;<br> Form_buy.Database1.Params.Add(UserName);<br> Form_buy.Database1.Params.Add(Password);<br> Form_buy.Database1.Connected:=true;<br> CurrentPersonID:=Personid;<br> form_buy.showmodal;<br> Form_buy.Database1.Connected:=false;<br> Form2.Free;<br> Form_rk.free;<br> form_buy.free;<br> result:=0;<br> except<br> result:=-1;<br> end;<br>end;<br><br><br>end.<br>请问贴这些够不够,我用的是D4+WIN98+SqlServer7.0<br>程序在运行到FreeLibrary时出来CPU窗口,进行不下去了<br>如果嫌分少,可再加,绝不矢言<br>如果需要将全部程序和库发送过去也行<br><br>