Questions tagged [bpl]

Borland Package Library - special kind of object-oriented DLL with enforced type-safety

Delphi is component-based IDE for its proprietary dialect of Pascal language.
Differing from its competitor Visual Basic, it could "eat its own food" - create those components to extend itself.

Up to 1996 to install them one need to recompile part of IDE, similar to installation in Lazarus/FCL IDE. That resulted in two problems:

  • The more components you install - the heavier IDE becomes, and computers back then had significantly less memory. You could not arrange different components subsets per project.
  • If some component proved cruelly broken and crashed IDE, reconfiguring and rebuilding it without the component becomes less obvious task w/o using IDE.

It also made little help to deploy large programs: one either had to deploy large monolithic EXE which could cause problems in OSes with 16-bit kernel (Windows 9x/ME), or develop traditional Windows DLL sacrificing all type safety and complex types (passing objects and strings on EXE/DLL or DLL/DLL boundary would be extremely fragile, practically impossible for average programmer).

With the release of Delphi 3 in 1997 Borland introduced specific type of DLL, the one with enforced type safety (dependencies are codified at compile-time and checked at load time) and changed one letter: DLL -> DPL - Delphi Package Library.

Next year Borland C++ Builder 1 was released (with built-in Delphi 3.5) and those libraries were renamed again: DPL -> BPL - Borland Package Library.

BPL remains the basement for component-based RAD Studio IDE design up to today.

Drawbacks of BPL:

  • Increases "implementation leakage" problem of Turbo Pascal, source Units of which where introduced before OOP trend. That forces private members and datatypes (worker classes) used be promoted into public unit interface. Later Delphi language designer fixed the problem by introducing partial classes into C#, but in Delphi this feature is missing. Since BPL publishes all interface sections of all the contained units, even internal "worker" units, there is no way to make stable contained API and spaghetti dependencies may easily happen unnoticed.
  • Since every unit is public by definition - and since BPL may be re-used by other apps - the Smart Linker is defeated. If you only need 1% of the library - you either re-work it or you deploy the whole library with 99% of slab. In monolithic EXE mode compiler would record XRefs and the Smart Linker would eliminate unused 99% of the library.
  • This also means you can not have several unit with the same name, like you can with DLLs. It is not big issue but may be inconvenient.
  • This also means that if you re-work some class like adding new internal method (virtual or not) - the class signature changes and all the depending BPLs have to be re-compiled and re-deployed. It is especialyl annoying when you need some fix in stock RTL
  • If you change compiler options or version, this change affects internal classes/functions ABI and all dependent packages should be re-build and re-deployed.
101 questions
1
vote
0 answers

Delphi XE Datasnap: Server methods missings when DSServerModule is load dynamically

I have Datasnap Server (DBX) that scans at startup a directory, loads the BPLs (containing the DSServerModules) and then registers them in order make them available from remote. It all works fine for functions and procedures that use primitive types…
1
vote
2 answers

Make a VCL package 64-bit compatible

I noticed that in a 64 bit application, the VCL Design components I have written are grayed-out in the component pallette: Other third party VCL components work in both 32 and 64 bit. My BPL can compile in 32-bit and 64-bit mode. There is no code…
Daniel Marschall
  • 3,739
  • 2
  • 28
  • 67
1
vote
1 answer

Delphi - Measure execution time per line of an unit

Currently I am working on performance improvements in a Delphi calculation module (bpl). In past days, I found several slow code lines. We improved execution time from 8 to 3 minutes. I found slow code lines by adding stopwatches all over the units,…
davepaul12
  • 391
  • 4
  • 15
1
vote
0 answers

Remote debugging Win32 VCL application built with custom runtime packages: bpl not found

I wrote a Win32 VCL application in Delphi 11.1 Alexandria, the application uses runtime packages that I also wrote myself. The application runs correctly on my development machine. I'm now trying to remote debug this application. The remote debugger…
MrSigge
  • 43
  • 5
1
vote
2 answers

I get a Can't load package error although the BPL is there

This issue is driving me crazy. I'm trying to compile and install The QR Designer from QuickReports 6. I have an issue just with the one package. When I right the package in the IDE > Install the IDE gives me: Can't load package…
Frank Pedro
  • 198
  • 2
  • 10
1
vote
0 answers

Delphi BPL fails to dynamically load a 64-bit package

I have a problem with dynamically loading my library when both the application and the library are compiled for 64-bit. The following statement: intHandle: = LoadPackage (PWideChar (strFileName)); causes the following error: Project Project1.exe…
Passella
  • 640
  • 1
  • 8
  • 23
1
vote
1 answer

Unresolved external / procedure entry point could not be located in BPL

I have a class called TTextStream in an existing project that inherits from TFileStream. It had a set of overloaded operator<< and operator>> function as member functions. class PACKAGE TTextStream : public TFileStream Most recommendations instead…
inquam
  • 12,664
  • 15
  • 61
  • 101
1
vote
1 answer

External modules security

I am developing some external modules for an application. These modules are BPL files and if present in the application folder the application loads them and uses whatever is available inside. How can I prevent the sharing of these modules by my…
Jlouro
  • 4,515
  • 9
  • 60
  • 91
1
vote
1 answer

How to update a Borland 6 C++ Project from including indy.bpi to indy60.bpi?

I develop with Borland Builder 6 in C++. And when I click on "Components" / "Installer des paquets", I see the Package dclIndy60.bpi : "Internet Direct (Indy) for D6 Property and Component Editors", meaning for me that it's all ok, I use as wished…
Arnaud
  • 17
  • 1
  • 4
1
vote
5 answers

BPL File needs Run-Time Packages !

I have created a Package and i want to use the BPL File of my Package ... My Package have VCL.dcp and RTL.dcp as Required libraries , i load this Package in my application without any errors but when i want to unload it , an Access Violation shown…
Mahmood_N
  • 521
  • 9
  • 20
1
vote
1 answer

Load Tframe from bpl to application

I am trying to load a tframe inside a delphi package (bpl) to be shown in my main app please give me code for both package and application.
Vibeeshan Mahadeva
  • 7,147
  • 8
  • 52
  • 102
1
vote
2 answers

How to use Delphi Dlls without enabling Build with runtime packages

Recently i started a project with so many forms , frames and extra controls, so my application was swelling up and i am using 3 exes in my projects(all made in Delphi 2009) and these applications are also sharing same frames and forms. so i used…
Vibeeshan Mahadeva
  • 7,147
  • 8
  • 52
  • 102
1
vote
0 answers

Is it possible to Export to a DLL a C++ class that inherits a base type from delphi BPL

I want to create a class Gctable::TGcTable that Inherits from Pgaccess::TPgTable and export it in a .DLL Question: Is it possible? I have such class definitions: class DLL_EXPORT TGcTable : public Pgaccess::TPgTable { ... public: __fastcall …
Paulius Zaliaduonis
  • 5,059
  • 3
  • 28
  • 23
1
vote
1 answer

What are ".~bpl" files?

Using Code Gear Delphi 2007 (don't know if it matter), each time a ".bpl" package is compiled, a ".~bpl" file is created too. What are ".~bpl" files? Are those files required or is there a way to avoid their creation?
Fabrizio
  • 7,603
  • 6
  • 44
  • 104
1
vote
1 answer

How to deploy ONLY .EXE and custom .BPL files?

I would like to develop GUI application with plugins. The plugins contains VCL Forms which are inherited from Base Forms in the Plugin-Core library. The main application can select which plugin to load dynamically, and then which Form subclasses to…
odomchen
  • 45
  • 7