Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As Alexander said, a BPL is basically a DLL. But there are some conditions (from a not-so-short summary I made: <a href="http://wiki.freepascal.org/packages" rel="noreferrer">http://wiki.freepascal.org/packages</a> ):</p> <ul> <li>A unit can only exist once in BPL's +Exe. This avoids duplication of state (twice the heapmanager and other global vars of system etc, VMT tables etc)</li> <li>.BPL's can only USE other .BPLs.</li> <li>This means that dynamic types like ansistring and IS/AS work properly over BPL interfaces.</li> <li>Initialization/finalization are separate procedure and their initialization order is strictly controlled. For static dynamic loading this is simpler, for dynamic loading (plugin-like) all dependancies on units are checked .</li> <li>Everything is essentially one big program, which means that the BPL's must be compiled with the same compiler version and RTL and depends on the versions other dependancies. It might be harder to make .BPL's to plugin to an existing EXE, since the Delphi version must match.</li> <li>This also means that you must deliver .dcp's for (non Delphi) .BPLs the plugin .BPLs depend on</li> </ul> <p>In short: if the plugin architecture is open, make it a DLL. Otherwise people have to have the exact same Delphi version to write plugins.</p> <p>Hybrid is also possible. An higher level .BPL interface for functionality you factor out into .BPL yourself and selected devels, and a rock bottom procedure DLL interface for the rest.</p> <p>A third option is using DLLs, but ordain Sharemem. Strings will work, multiple Delphi versions will work. Objects can work but are unsafe (e.g. I guess e.g. D2009 with an earlier version wouldn't work). Even other language users might be able to allocate over COM, not entirely excluding non Delphi.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload