Skip to content

Software License Dongle for Delphi

Delphi applications are disproportionately likely to be exactly the kind of software worth protecting: long-lived engineering, measurement, medical and industrial tools, often with a decade or more of accumulated domain knowledge inside them.

They are also disproportionately likely to be stuck on a dongle whose vendor has moved on, discontinued the part, or dropped support for the parallel or USB-A device the software was built around. KeyNub binds through a plain Pascal unit over the same stable C ABI every other language uses, so migrating is a matter of swapping the calls, not restructuring the application.

Using it

Add LicDongle.pas to your project and deploy the shared library alongside your executable.

uses LicDongle;

var
  Dongle: TKeyNubDongle;
  License: TBytes;
begin
  Dongle := TKeyNubDongle.Create;
  try
    if not Dongle.Open('') then Exit;     // first dongle found
    if not Dongle.IsGenuine then Exit;

    Dongle.SessionOpen;
    License := Dongle.RecordRead('license');
  finally
    Dongle.Free;                          // closes the device
  end;
end;Code language: Delphi (delphi)

Bitness

Deploy the shared library matching your build target — a 32-bit Delphi application needs the 32-bit library, and both are supplied. Unlike the VB6 route, there is no calling-convention trap here: Delphi declares cdecl correctly, which is what the C ABI uses.

Do not gate on a boolean

// Weak: one patched conditional jump.
if Dongle.IsGenuine then EnableFeature;

// Strong: data the program cannot compute for itself.
Coefficients := Dongle.AppDecrypt(EncryptedBlobFromInstaller);Code language: Delphi (delphi)

Native code is harder to patch than a .NET assembly, but not hard enough to rely on. Put the dongle on the critical path and the question stops being how well your check is hidden.

All supported languages · Buy a KeyNub · Ask us something

KeyNub

A project of AB-Tools GmbH.
Address: Marsstraße 78 · 80335 Munich · Germany
Phone: +49 89 38898588 · Fax: +49 89 38898589
E-mail: info@keynub.com

Managing Director: Andreas Breitschopp
Commercial register HRB 202859 · Amtsgericht München (Munich local court)
VAT ID DE268720895 · Munich tax office for corporations
Grenke Bank AG · IBAN: DE49201304000060270139 · BIC: GREBDEH1XXX

Developers · Payment Methods · Shipping · Terms & Conditions · Right of Withdrawal · Privacy Policy · Legal Notice