蓝
蓝叶菱
Unregistered / Unconfirmed
GUEST, unregistred user!
我最近做了一个含有窗口的DLL。但是在发布的时候,必须发布VCL.BPL和RTLD7.BPL才能使用。怎么回事????(含有DELPHI7的机子测试不出来)<br>能不能就是DLL本身呢。以下是源代码。<br>library HttpUpdater;<br>uses<br> SysUtils,<br> Classes,<br> uFrmHttpUpdater in 'uFrmHttpUpdater.pas' {FrmHttp_Updater},<br> uDM in 'uDM.pas' {DM: TDataModule},<br> CGlobal in '../../Project/Common/cGlobal.pas';<br><br>{$R *.res}<br>function PShowHttpUpdater(AppHandle:integer;keychar):integer;stdcall;export;<br>begin<br> Result:=ShowHttpUpdater(AppHandle,StrPas(key));<br>end;<br>////////////////////////////////////////////////<br>exports<br> PShowHttpUpdater;<br>begin<br>end.<br><br>function ShowHttpUpdater(AppHandle:integer;key:string):integer; stdcall; export;<br>var<br> FrmHttp_Updater: TFrmHttp_Updater;<br><br>implementation<br><br>uses cGlobal, uDM;<br><br>{$R *.dfm}<br>function ShowHttpUpdater(AppHandle:Integer;key:string):integer;stdcall;export;<br>begin<br> Result:=0;<br> //if LowerCase(key)='westsky' then<br> Application.Handle:=AppHandle;<br> DM:=TDM.Create(Application);<br> FrmHttp_Updater:=TFrmHttp_Updater.Create(Application);<br> try<br> Result:=FrmHttp_Updater.ShowModal;<br> finally<br> FrmHttp_Updater.Free;<br> DM.Free;<br> end;<br>end;<br><br>调用部分:<br>function PShowHttpUpdater(AppHandle:integer;keychar):integer;stdcall;<br> external 'HttpUpdater.dll';