HOWTO: Loading the List & Label DLLs Dynamically in C/C++ and Delphi

Valid from List & Label 8
Often it would be useful to load the List & Label DLLs dynamically at runtime when they are actually needed (decreases memory usage, improves appliction's startup time, etc.). To make this comfortable for the programmer we have provided special declaration files for C/C++ and Delphi which can be find in your List & Label installation.

To implement dynamic loading of List & Label you only need to perform a few simple steps (replace "??" with the corresponding List & Label main version number):
  • Replace the inclusion of "cmbtl??.h" with "cmbtl??.hx".
  • Insert following lines of code in one of your source modules:
#undef _LL??_H
#define IMPLEMENTATION
#include "cmbtll??.hx"
#undef IMPLEMENTATION
  • Now the functions LL??xLoad() and LL??xUnload() are additionally available. Use them to load List & Label dynamically.
  • Remove cmll??.lib from your linker library settings.

That's it! Your other List & Label relevant source code remains untouched.
Following you find the complete relevant code:
// ...
#include "cmbtll??.hx"
// ...

#undef _LL??_H
#define IMPLEMENTATION
#include "cmbtll??.hx"
#undef IMPLEMENTATION

// ...
if (LL??xLoad() < 0)
{
    MessageBox("Error: cannot load LL??!");
    return;
}

// ... normal List & Label operation

LL??xUnload();


Hint: For Delphi proceed accordingly and use the .PX file.

Important: This dynamic loading mechanism does only work when using the DLL API interface of List & Label. If you use a List & Label component then the component provides its own automatic loading mechanism. You won’t be able to influence it with the method shown above.

IDKBTE000595 KBTE000595