AV-SOFT.COM
AVLock SIMPLE
Introduction
What is AVLock SIMPLE?
How to buy AVLock SIMPLE?
License Agreement
Using AVLock Simple
How to install AVLock SIMPLE?
How does AVLock SIMPLE work?
Properties
Methods
Brief practice with Demo's
The Online License Manager (OLM)
The RegMonitor utility
The KeyGen utility
The RegisterIt utility
The CodeCheck utility

What is AVLock SIMPLE?

Top  Previous  Next

s31logo_simple70

AVLock Simple is a simple and  powerful licensing component. It has not forms of any kind, simply does the work and gives you the necessary features to retrieve the registration status and to register your application. You design your own interface. You decide how to protect your application according with the registration status. In this way you will be able to implement all possible configurations for previous AVLock versions and much more.

 

I have developed this new component because many customers don't like the standard interface of AVLock and want to make their own forms. So AVLock Simple does not include any forms. I also changed some conceptual issues: in AVLock Gold / Pro there are two kinds of modules; the main module (the application) and extra modules, but AVLock Simple doesn't make this difference; all modules (0..254) conceptually are identical. You can chose a module to manage the whole application or chose several ones to manage different features in your application.

 

Why you would need AVLock SIMPLE?

 

If you are a Delphi programmer and need to market your software securely, and you want that your potential customers evaluate your products before to buy them, probably AVLock SIMPLE would be the solution that you were wanted for.

Also, with this small component you will be able to manage from internet the whole licensing cycle of your application, namely:

 

·Start the trial period.
·Extend the trial period.
·The user buy the application and send data to your website.
·The user activate the application.
·The user optionally moves the license to another computer.

 

Also:

 

·Allow to achieve the licensing operations offline through registration keys.
·Allow to provide licenses to be shared between a limited number of users and manage the process through internet using the OLM.
·Allow to manage the number of concurrent instances of your application.
·Allow to configure your application to be installed into a removable disk like a pendrive, memory stick, etc.
·Through the registration works AVLock SIMPLE attach your application to the computer using some numbers coming from several sources of the machine (from the BIOS, from the CPU, from the hard disk, from the network card, etc.), called the InstallCodeSources. Based in these numbers is calculated the InstallCode and based in the Installcode finally is calculated the registration key to register the application. So your application is attached to only one machine and will not work on other computers.
·While the trial period allow to detect when an user get back the system date, perhaps with the purpose to stay using your application after expiration, so you will be able to stop the program when that occurs.

 

New in v3.2 e

We are introducing in this release the new shareware edition with the possibility to register it at the low price of $19.95. Also we added support for the new Delphi 2009 recently released.

Some new features has been added in this release in order to facilitate some common tasks. The checkdate.php script has been added to the Basic OLM and a new feature implemented into the Advanced OLM called through the OnlineFullSynch() method in order to implement automatic synchronization for some situations, namely: to start and extend the trial period and activate a new license key when a payment has been done.

New properties:

·OlmPath: (Default '/olm3'). Allow to specify the path into your server where you have installed the OLM scripts.
·OlmBasicScript: (Default 'basickeymanager.php'). Allow to specify the name of the file script into the OLM to manage the basic feature associated with the OnlineGetKeyB() method. 
·OlmAdvScript: (Default 'advancedkeymanager.php'). Allow to specify the name of the file script into the OLM to manage the advanced features associated with the following methods: OnlineRegisterKey(), OnlineStartTrial(), OnlineExtendTrial(),  OnlineGetKeyA(), OnlineMovePrimary1(), OnlineMovePrimary2(), OnlineMoveSecondary1(), OnlineMoveSecondary2(), OnlineRestorePrimary(), OnlineRestoreSecondary(), OnlineSynch(), OnlineRenew(), OnLineStartSecondary(), OnlineRemoveReg(), OnlineGetRegData(), OnlineSaveUserData().
·OlmCheckScript: (Default 'checkdate.php'). Allow to specify the name of the file script into the OLM to manage the basic feature associated with the OnlineCheckDate() method.

New methods:

·function Values2Num(Values:string; nibble:byte):integer;
·function IsValueOn(Values:string; nibble, digit:byte):boolean;
·function Status2Str(Module:TModuleData):string;
·function OlmError2Str(err:string):string;
·function OnlineFullSynch(nmod:word):string;

Other changes and additions:

Added the DaysLeft field into the TModuleData record.

All source code has been reviewed and modified in order to support Delphi 2009 now with the new standard 16-bit char type and its associated Unicode String.

A new utility RegisterIt.exe is included in this package in order to allow you to register the shareware edition.

 

New in v3.1 e

Some new features has been added in this release. The new RegPath and RegFolder properties has been added in order to simplify the allocation for the RegFilePath property. Also in this release we added some features to to support Guest users, so the IsGuest and LastError  properties has been added.

New properties:

·RegPath (Default: CommonDocuments): Allow to select the appropriate Special Folder into a list of standard values (CommonDocuments, ProgramData, RoamingAppData, LocalAppData, Other), so the RegFilePath property is automatically assigned with the appropriate special folder according with the chosen value and the current Windows version:

CommonDocuments: 

XP:     C:\Documents and Settings\All Users\Documents

Vista:  C:\Users\Public\Documents

 

ProgramData:

XP:     C:\Documents and Settings\All Users\Application Data

Vista:  C:\ProgramData

 

RoamingAppData:

XP:     C:\Documents and Settings\<username>\Application Data

Vista:  C:\Users\<username>\AppData\Roaming

 

LocalAppData

XP:     C:\Documents and Settings\<username>\Local Settings\Application Data

Vista:  C:\Users\<username>\AppData\Local

 

 

Other: If you chose this option then you must provide the value you want for the RegFilePath when you start your application and before to call anything from the component, for example into the .dpr file as follow:

 

function GetSpecialFolder(const CSIDL : integer) : string;

var RecPath : PAnsiChar;

begin

RecPath := StrAlloc(MAX_PATH);

try

   FillChar(RecPath^,MAX_PATH,0);

   if SHGetSpecialFolderPath(0,RecPath,CSIDL,false) then begin

     result := RecPath;

   end else result := '';

finally

   StrDispose(RecPath);

end;

end;

 

begin

Application.Initialize;

Application.CreateForm(TMainForm, MainForm);

with MainForm do

Begin

   avlocks31.EncryptionKey := 'abc123';

   avlocks31.EncryptionKey2 := 'xyz321';

   avlocks31.AppID := 12343;  

   avlocks31.RegFilePath := GetSpecialFolder(12); //CSIDL_MYDOCUMENTS = 12 = 0x000c

end;

. . .

end;

 

·RegFolder: (default: 'avlocks3') Here you should enter the name for the folder where you want to save the Registration data files (*.avr and *.avc files). So, the RegFilePath2 property (the final and applied RegFilePath) will be assigned internally as follow:

  RegFilePath2 :=  RegFilePath + '\' + RegFolder;

·IsGuest: Boolean property set to True for Guest users. Used internally to bypass over some features for this kind of users. When the component detect a Guest user this operates at a different way than with normal users, the Installcode is retrieved from the saved registration data and OLM access and write operations are forbidden. 

 

New in v3.0 e

A lot of new features has been added in this release mostly in order to improve the security and licensing capabilities.

New items:

·The properties InstallCode e InstallCodeSources has been changed. Two items has been removed, BIOS_SN and MAC_Address, reducing so  the number of sources in order to reserve more space for each one into the Installcode structure. Previously each source took only 3 nibbles allowing up to 4095 different values. This is too little, mainly when the user use only one source, then is very feasible that two different users have identical Installcodes and sharing so the same record into the OLM. Now each source take up 4 nibbles allowing up to 65535 different values, making so very improbable that this problem occurs. However, if you want make it still more improbable, use more than one source like in the default option CPU_ID and HD_SN.
·The OLM has been changed and new fields and features added. We will highlight the possibility to give licenses to be shared by a limited number of users anywhere in the world, controlling the process by internet through the OLM.
·Formerly the fields 'users' and 'ToManyUsers' referenced to the number of concurrent instances allowed, but now 'users' refer to the number of users allowed to be registered through the OLM for a single license and 'TooManyUsers' was renamed as 'TooManyInstances'. 
· The internal structure of the Registration Key has been changed. The 'Values' field was added taking 3 nibbles into the structure allowing so to control, activate/deactivate features, taking more control of your application with a single Registration Key.

 

New properties:

·EncryptionKey2: Secondary encryption key. All data transferrred and received from the OLM is strongly encrypted using this value as encryption key.
·InternetPort : Used as parameter into the  InternetConnect() function. Were added in order to allow you to specify the proper value. e.g. to access to a secure HTTPS site. 
·InternetFlag : Used as parameter into the  HttpOpenRequest() function. Like in the previous case, added in order to allow you to specify the proper value. e.g. to access to a secure HTTPS site.
·RegFilePath : Allow you to specify the folder where the registration data will be saved.
·Company and Email : Added to have more information about the user.
·InstancesCtrl : Allow activate/deactivate the control of simultaneous number of instances for your application.

New methods:

The new methods were added for the OLM access:

function OnlineRegisterKey(phpfile,Key:String):string;

function OnlineStartTrial(phpfile:string; nmod:word):string;

function OnlineExtendTrial(phpfile:string; nmod:word):string;

function OnlineGetKeyB(phpfile,values:string; kind, nmod, days, usrs:word):string;

function OnlineGetKeyA(phpfile,values:string; kind, nmod, days, startdate, usrs, inst:word):string;

function OnlineMovePrimary1(phpfile:string; nmod:word):string;

function OnlineMovePrimary2(phpfile,OldIcode:string; nmod:word):string;

function OnlineMoveSecondary1(phpfile:string; nmod:word):string;

function OnlineMoveSecondary2(phpfile,OldIcode:string; nmod:word):string;

function OnlineRestorePrimary(phpfile:string; nmod:word):string;

function OnlineRestoreSecondary(phpfile:string; nmod:word):string;

function OnlineSynch(phpfile:string; nmod:word):string;

function OnlineRenew(phpfile:string; nmod:word):string;

function OnLineStartSecondary(phpfile,icodep:string; nmod:word):string;

function OnlineRemoveReg(phpfile:string; nmod:word):string;

function OnlineGetRegData(phpfile:string; nmod:word):string;

 

Also the following method:

 

function DecodeAppData(appdata:string; var icsources:TInstallCodeSources;

           var UsrNam,Comp,Eml,AppNam,AppVer,icsrc:string; var RanCod,OtherCod:word):boolean;

 

Methods changed:

 

·WriteApp() and ReadApp() was renamed as WriteAppData() and ReadAppData().
·DecodeRegData() was renamed as DecodeRegKey().

 

Changes in utilities:

 

·A new RegMonitor allow now to access to the OLM in order to see and modify data. This can replace the control panel.

 

New in v2.1 e

 

Changed methods:

 

Some methods has been changed in order to adapt them to the new Online License Manager (OLM).

 

Function GetOnlineTrial():

v2.0: function GetOnLineTrial(phpfile:string; nmod, days:word):integer;

v2.1: function GetOnLineTrial(phpfile:string; nmod, days, users:word):integer;

 

Function OnLineReg():

v2.0: function OnLineReg(phpfile:string; users, nmod, days, startdate:word):integer;

v2.1: function OnLineReg(phpfile:string; nmod:word):integer;

 

New Online License Manager (OLM):

 

This set of PHP scripts has been changed in order to enhance its functionality. Now it is possible to manage the number of allowed users and the number of days for temporary keys directly from the control panel. 

 

New Demo Samples:

 

Most of them has been refurbished including samples for real scenarios that may be used directly into your programs.

 

New in v2.0 e

A lot of new features has been added in this release mostly in order to add online licensing capabilities.

New items:

·A new item "Other_Source" added to the InstallCodeSources property to allow you to chose any other source apart of the standard ones (BIOS_SN, CPU_ID, HD_SN, etc) to be included in the InstallCode calculation. May be a value coming from the machine or any other source like a number from a data record.
·New item "Moved" added to the TModuleData record in order to inform when the module was moved to another computer.

 

New properties:

·OtherSrc: Added in order to hold the value received at runtime from the OnGetOtherSource event manager.
·WebHost: The host name of the server in order to access to the AVLock Online License manager consisting of a set of php scripts in order to manage the whole licensing cycle, namely to start the trial period, optionally extend it, purchase and activate the application, and finally to move the license to another computer if needed. By default this property is set up to 'www.valega.com'. (see Demo5).
·The RegMoved property was removed since now the "Moved" concept is not applicable to the whole application, instead each module have its own "moved" condition and may be moved independently.

New Event handlers:

·The Event handler OnGetOtherSource added in order to allow to hold the value received at runtime from the OnGetOtherSouce event manager.

 

New methods:

·ReadModule() : Used internally by GetModule(), SetModuleMoved(), OnlineMoveReg() and OnlineCheckMoved().
·SetModuleMoved() : Set into the local registration data the given module as moved.
·OnlineRequest() : Posts data to a target php script into the server (WebHost property) and retrieves the returned data. 
·GetOnlineKey() : Posts data to a target php script into the server in order to calculate a key according with the posted data and retrieves the key calculated and returned by the script. 
·OnlineReg() : Calls the GetOnlineKey() method and saves in the local registration data the returned key.
·OnlineMoveReg() : Used to set the given module as moved both; into the local data and into the MySql database into the server (WebHost).
·OnlineCheckMoved() : Used to retrieves from the remote MySql database the Moved status by the given module.

Changed methods:

·DecodeIcode(), DecodeRegData(), ReadApp() : the "Moved" parameter has been removed from these methods since the moved concept is no longer concerning to the whole application, now each module have its own moved value.

The Advanced Online License Manager:

A new set of php scripts in order to manage the whole licensing cycle, namely to start the trial period, optionally extend it, purchase and activate the application, and finally to move the license to another computer if needed, includes an online utility to allow to access to the remote database in order to view and edit the registration data. (see Demo5)

 

New in v1.2 Ease to use

·A new way to configure the component was implemented to allow you to create trials based only in the user name. So, both utilities KeyGen and RegMonitor were modified allowing now to enter the user name in order to generate user name based keys. Also the Demo4 sample was added to show how to implement this approach.
·The new method Restart() has been added. 
·Bug fixed into the call to the ReadApp() method from the  Start() method.

 

New in v1.1 Ease to use

·Automatic and transparent Trial generation implemented through a PHP code in a web site called from the GetOnlineTrial() method.
·Added the GetOnlineKey() method to generate any kind of keys using the same PHP code.
·The *.avr Registration file format was changed in order to allow a different entry for each machine into a network, so now all machines can be managed by an unique file.
·Two new utilities added; KeyGen for keys generation and CodeCheck in order to check and compare InstallCodes.

 

HOW MUCH COSTS IT?

AVlock SIMPLE comes in four different packages:

1. Shareware edition: Fully functional 60 days trial. you can use it royalty free in your commercial applications. You can register it at $19.95. Registered users will receive for free the Basic Online License Manager (Basic OLM).

2. Standard edition: At $49.95.  Fully functional and you can use it royalty free in your commercial applications. Also this includes the Basic Online License Manager, the same used in my web site. You can use and modify it without restrictions in order to implement your own online key generator. 

3. Professional edition: At $76.95.  All included in the standard edition plus the Advanced Online License Manager (Adv.OLM), the same used in my web site. You can use and modify it without restrictions in order to implement your own online key generator. 

4. Developer edition: At $149.95. All included in the professional edition plus the source code for the component and utilities.

 

The prices shown above would can be changed without previous warning.