2010. február 8., hétfő

Undocumented: Delphi Visual Component Library Access License


Problem/Question/Abstract:

Undocumented: Delphi Visual Component Library Access License

Answer:

The SysUtils.pas unit contains some very interesting routines that are used by the VCL components to check if the correct version of Delphi is beeing used to compile the code (e.g. C/S components won't run if compiled with the Pro compiler).

Here are the functions:

function GDAL: LongWord;

Get Delphi Access License. Retreives the access licences resource. It checks if it is valid, if not an exception with the message 'Application is not licensed to use this feature' is raised.
The returned value is the decrypted first Access Licence (AL1).

procedure RCS;

Perform a check to see there is a Delphi Client Server licence. An exception is raised if the license is not valid.

procedure RPR;

Perform a check to see there is a Delphi Pro licence. An exception is raised if the license is not valid.

Other non exposed functions are:

function AL1(const P): LongWord;
function AL2(const P): LongWord;

These two functions return the decrypted value of the license value specified by P.

procedure ALV;

Raises an Access Licence Violation exception.

function ALR: Pointer;

Access License Resource loader. Returns a pointer to the loaded access license. An exception is raised if the resource is not found.

Nincsenek megjegyzések:

Megjegyzés küldése