dll工程:library PrgCollectInfDll;uses SysUtils, Classes, Forms, System, Messages, Dialogs, DB, DBClient,....function dcreatdm:Integer;export;stdcall;begin try if DateMoudleMain=nil then Application.CreateForm(TDateMoudleMain, DateMoudleMain); Result := 1; except Result := -1; end;end;function dcreatfm(aHandle:THandle;aindex:Integer):Integer;export;stdcall;begin try application.Handle := aHandle; case aindex of 0: begin FrmPubParaInfo := TFrmPubParaInfo.Create(nil); try FrmPubParaInfo.ShowModal; finally FrmPubParaInfo.Free; end; end; 1: begin end; 4: begin end; end; Result := 1; except Result := -1; end;end;function dfreedm:Integer;export;stdcall;begin try if DateMoudleMain<>nil then DateMoudleMain.Free; Result := 1; except Result := -1; end;end;exportsdcreatdm,dcreatfm,dfreedm;静态调用:... private { Private declarations } public { Public declarations } end; function dcreatdm:Integer;stdcall;external 'PrgCollectInfDll.dll' name 'dcreatdm'; function dcreatfm(aHandle:THandle;aindex:Integer):Integer;stdcall;external 'PrgCollectInfDll.dll' name 'dcreatfm'; function dfreedm:Integer;stdcall;external 'PrgCollectInfDll.dll' name 'dfreedm';var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begin dcreatdm;end;procedure TForm1.Button2Click(Sender: TObject);begin dcreatfm(Application.Handle,0);end;procedure TForm1.Button3Click(Sender: TObject);begin dfreedm;end;procedure TForm1.Button4Click(Sender: TObject);begin dcreatfm(Application.Handle,1);end;...