📄 vipdll.dpr
字号:
library VipDLL;
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }
uses
sharemem,
SysUtils,
Windows,
forms,
Sconnect,
Classes,
DBClient,
Base in '..\PublicDll\Base.pas' {frmBase},
Base_Dll in '..\PublicDll\Base_Dll.pas' {frmBase_DLL},
Global in '..\PublicDll\Global.pas',
DataProcess in '..\PublicDll\DataProcess.pas',
MDIBase in '..\PublicDll\MDIBase.pas' {frmMDIBase},
Binterface in '..\PublicDll\Binterface.pas' {frminterface},
Bsearch in '..\PublicDll\Bsearch.pas' {frmSearch},
BaseInfo in '..\PublicDll\BaseInfo.pas' {frmBaseinfo},
BaseInfo_M in '..\PublicDll\BaseInfo_M.pas' {frmBaseInfo_M},
untVIP in 'untVIP.pas' {frmVIP},
untVIP_M in 'untVIP_M.pas' {frmVIP_M},
BaseHandleSearch in '..\PublicDll\BaseHandleSearch.pas' {frmHandleSearch},
untCustomerSearch in 'untCustomerSearch.pas' {frmCustomerSearch},
untImageBrowse in '..\BaseInfoDll\untImageBrowse.pas' {frmImageBrowse},
BaseSearch in '..\PublicDll\BaseSearch.pas' {frmBaseSearch},
untVipintegral in 'untVipintegral.pas' {frmvipintegral};
{$R *.res}
procedure LoadVipDLL(PApplication: TApplication; PForm: TForm;
FormName:String;DB_Name:String;PCn:TSocketConnection;
PUsercode:String;Badmin:boolean;PCDS:TclientDataset;
ModuleID:integer;FunctionName:String;MainHandle:integer); export; stdcall;
begin
Application:=PApplication;
FormName := UpperCase(FormName);
CurrentDBName:=DB_Name;
DLLCDS:=PCDS;
DLLUcode:=PUsercode;
DLLSCT := PCn;
G_Badmin:=Badmin;
iModuleID:=ModuleID;
sFunctionName:=FunctionName;
// FormHandle:=MainApplicationHandle('TfrmClientMain');
FormHandle:=MainHandle;
if FormName='FRMVIP' then
begin
if not assigned(frmvip) then
frmvip:=Tfrmvip.Create(pForm);
end;
if FormName='FRMVIPINTEGRAL' then
begin
if not assigned(frmvipintegral) then
frmvipintegral:=Tfrmvipintegral.Create(pForm);
end;
end;
procedure DLLUnloadProc(Reason: Integer); register;
begin
if Reason = DLL_PROCESS_DETACH then
begin
if assigned(frmVip) then
frmVip.Free;
if assigned(frmvipintegral) then
frmvipintegral.Free;
Application := SaveApplication;
end;
end;
exports
LoadVipDLL;
begin
SaveApplication := Application;
DllName := 'VipDLL';
DLLProc := @DLLUnloadProc;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -