When we use SysUtils.LoadPackage in Delphi, the following procedure will be invoked:
If we are very sure that our .bpl packages has no duplicate unit name, we may safely ignore the call to "CheckForDuplicateUnits" procedure. It should improve the loading speed of your Delphi application that built with runtime packages.
procedureInitializePackage(Module: HMODULE; AValidatePackage: TValidatePackageProc);type
TPackageLoad =procedure;var
PackageLoad: TPackageLoad;begin
CheckForDuplicateUnits(Module, AValidatePackage);
@PackageLoad := GetProcAddress(Module,'Initialize');//Do not localize
ifAssigned(PackageLoad)then
PackageLoad
else
raiseEPackageError.CreateFmt(sInvalidPackageFile, [GetModuleName(Module)]);end;
If we are very sure that our .bpl packages has no duplicate unit name, we may safely ignore the call to "CheckForDuplicateUnits" procedure. It should improve the loading speed of your Delphi application that built with runtime packages.
No comments:
Post a Comment