There can be many forms and many functions in the package, but all the exports that can be called externally are required.
Exports
Doshowform;
Function doshowform;
Begin
Fmwindow: = tform. Create (application );
Fmwindow. show;
End;
Note: If a certain PAS has manyProgramYou can package it into a BPL file so that it will not be used in another package.
In an external executable program, the project option sets the runtime package: VCL; RTL; dbrtl; adortl; vcldb (main). If a third-party control is used in development, you may need to add some third parties here.
Package call example
VaR
Packagemodule: hmodule;
function doshowform;
type
tdoshowform = function ();
var
doshowform: tdoshowform;
begin
packagemodule: = loadpackage ('bplxxx. BPL ');
If packagemodule <> 0 then
try
@ doshowform: = getprocaddress (packagemodule, doshowform);
if assigned (dostockadjust) then
begin
doshowform;
end;
release T
If packagemodule <> 0 then unloadpackage (packagemodule);
end;
end;