Once heard that "BPL is a special kind of dll", but did not think that this sentence has so much significance. Recently, I was surprised to see someone write the export statement in the unit belonging to a dpk. But all the help of Delphi, and export related is the library. Today read the "Delphi Source code Analysis", just know the meaning of this sentence. So there is the following corollary:
For DLL engineering, exports can either be written in engineering documents or written in unit, no difference.
BPL is a DLL.
The exports above is normal.
In fact, according to the "Delphi Source code Analysis" Inside the saying, BPL just on the basis of the DLL added some features, such as checking repeat unit. The operating system considers BPL and DLLs to be the same type of file. And the book gives a tdump result of the simplest BPL:
package NullPackage;
requires
rtl;
end.
E:\ls>tdump -m -ea:v NullPackage.bpl
Exports from NullPackage.bpl
7 exported name(s), 7 export addresse(s). Ordinal base is 1.
Sorted by RVA:
RVA Ord. Hint Name
-------- ---- ---- ----
0000124C 1 0006 @GetPackageInfoTable
0000124C 2 0003 @NullPackage@@GetPackageInfoTable$qqrv
00001254 3 0002 @NullPackage@@PackageLoad$qqrv
00001254 7 0005 Initialize
00001260 4 0001 @NullPackage@@PackageUnload$qqrv
00001260 6 0004 Finalize
0000126C 5 0000 @NullPackage@initialization$qqrv
Have you seen several functions pointing to the same address? This is about the meaning of exports.