📄 yujiao.dpr
字号:
library YuJiao;
uses
Forms,
Dialogs,
MainOutUnit in '..\..\MainOutUnit.pas',
UnitDataMD in 'UnitDataMD.pas' {DataMd: TDataModule},
Prepay in 'Prepay.pas' {FormPrepay},
SelOpDate in 'SelOpDate.pas' {FormOpDate};
var
OldHandle:THandle;
{$R *.res}
procedure DLL_Create(AOwnerHandle:THandle);
begin
OldHandle:=Application.Handle;
DCntString:='';
DCurHUHAO :='';
DCurYHID :=-1;
DCurLSH :='';
DCurSFXH :=-1;
DCurOpID :=-1;
DCurOpName:='';
Application.Handle:=AOwnerHandle;
InitMainOutFun;
end;
procedure DLL_Destory;
begin
Application.Handle:=OldHandle;
end;
procedure DLL_InitDatabase(ConnectionStr,HuHao,LSH,OpName:PChar;YongHuID,ShouFeiXH,OpID:Integer);
begin
DCntString:=ConnectionStr;
DCurHUHAO :=HuHao;
DCurYHID :=YongHuID;
DCurLSH :=LSH;
DCurSFXH :=ShouFeiXH;
DCurOpID :=OpID;
DCurOpName:=OpName;
with DataMD do begin
ADOConnection.ConnectionString:=ConnectionStr;
ADOConnection.Connected:=True;
end;
end;
procedure DLL_Open;
var
FormPrepay: TFormPrepay;
begin
FormPrepay:= TFormPrepay.Create(Application);
FormPrepay.ShowModal;
FormPrepay.Free;
end;
procedure DLL_Prepay(YuJiaoFee:double);
var
FormPrepay: TFormPrepay;
begin
FormPrepay:=TFormPrepay.Create(Application);
FormPrepay.EditHH.Text:=DCurHUHAO;
FormPrepay.CEditYuJiao.Value:=YuJiaoFee;
FormPrepay.YuJiao;
FormPrepay.ShowModal;
FormPrepay.Free;
end;
procedure LibraryProc(Reason: Integer);
begin{DLL的初始化和卸载函数}
case Reason of
0:begin
DataMd.Free;
end;
1:begin
DataMd:=TDataMd.Create(Application);
end;
end;
end;
exports
DLL_Create,DLL_Destory,DLL_InitDatabase,DLL_Open,DLL_Prepay;
begin
DLLProc:=@LibraryProc;
DLLProc(1);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -