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.