Packages in Delphi (iii): BPL and DLLs

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.