I am just adding another answer to this question, for all the people who search for actual DVCLAL (= Delphi Visual Component Library Access License) values, as well as some other information for all people who are curious about how stuff works.
- As Jeroen Wiert Pluimers said, if you want to check for "Professional or higher" or "Enterprise only" inside your Delphi application/library/package/component, you can use
RPR
(= "Require Professional") or RCS
(= "Require Client/Server"; Client/Server was the name for the Enterprise edition in early Delphi versions) respectively. If the requirement is not met, ALV
(= "Access License Violation") will be called which will raise an Exception
with the message defined in SysConst.SNL
(= "(String) Not Licensed"). In English:
Application is not licensed to use this feature
- In case you want to check for one specific edition, you can use the output of the function
GDAL
(Get Delphi Access License), which is one of the following (AL1s
array):
AL1s[0] = $FFFFFFF0; // Standard/Personal edition DVCLAL value
AL1s[1] = $FFFFEBF0; // Professional edition DVCLAL value
AL1s[2] = $00000000; // Enterprise/ClientServer edition DVCLAL value
AL1s[3] = $FFFFFFFF; // DVCLAL resource not existing
If the DVCLAL resource has an invalid value, GDAL
will call ALV
which will raise an Exception
with the message SysConst.SNL
.
- In case you want to check the DVCLAL value of a foreign EXE/DLL file (e.g. if you want to write a Resource Editor, decompiler, etc), then you'll have to query the DVCLAL resource directly.
There are only three official values:
Standard: 23 78 5D 23 B6 A5 F3 19 43 F3 40 02 26 D1 11 C7
Professional: A2 8C DF 98 7B 3C 3A 79 26 71 3F 09 0F 2A 25 17
Enterprise: 26 3D 4F 38 C2 82 37 B8 F3 24 42 03 17 9B 3A 83
- Just for fun: If you solve the formula
0 = (ROR(a,15) xor a) xor (ROR(b,10) xor b) xor (ROR(c,5) xor c) xor (AL1 xor AL2)
you can define any DVCLAL value (tuple a, b, c, d) you want! (AL1
and AL2
are the values in the AL1s
and AL2s
arrays that describe the desired Delphi edition; ROR
is rotating right without carry)
For example, here are alternative DVCLALs that work too:
Standard: 00 00 00 00 00 00 00 00 9B 70 0C 66 6B 8F F3 99
Professional: 00 00 00 00 00 00 00 00 9A DB 73 0F 6A 30 8C F0
Enterprise: 00 00 00 00 00 00 00 00 D8 B2 48 11 D8 B2 48 11
To validate a DVCLAL, you calculate
AL1 := DVCLAL[0] xor DVCLAL[1] xor DVCLAL[2] xor DVCLAL[3];
AL2 := ROR(DVCLAL[0],15) xor ROR(DVCLAL[1],10) xor ROR(DVCLAL[2],5) xor DVCLAL[3];
and look up AL1
and AL2
in the array AL1s
and AL2s
,
This way you can disguise the edition you have used (at least a little bit).
In the meantime, official documentation, at least for the functions GDAL, RPR, and RCS, has been published.
Of course, everything works for C++ Builder, too.