Obtaining Information About a Package

It is possible to query a package for information about which units it contains and which packages it requires. Two functions are used to do this: EnumModules() and GetPackageInfo(). Both of these functions require callback functions. Listing 14.5 illustrates the use of these functions. You'll find this demo on the CD.

Listing 14.5. Package Information Demo
unit MainFrm; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, DBXpress, DB, SqlExpr, DBTables; type TForm1 = class(TForm) Button1: TButton; TreeView1: TTreeView; Table1: TTable; SQLConnection1: TSQLConnection; procedure Button1Click(Sender: TObject); private { Private declarations ...

Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.