Syntax

code

Function: IsUnlocked(AProduct: String; AMajorVer: Integer; AMinorVer: Integer; AllowUnlock: Boolean): Boolean;

Description

Checks the product activation status of a plugin. If AllowUnlock is true the user is prompted to Activate if needed.

Code Reference

  • 1. Create a New Form application
  • 2. Add a button to the form
  • 3. add Planswift to reference (Planswift9_tlb in the uses)
  • 4. copy code to button onclick event

code

1

2

3

4

5

6

7

8

9

10

11

procedure TForm1.psUnlocked(Sender: TObject);

var

  ps: IPlanSwift;

begin

  ps := CoPlanswift.Create;

  if ps.IsUnlocked('SDK Sample',1,0,false) then

    ShowMessage('You have unlocked your version')

  else

    ShowMessage('You do not have a license for this plugin');

  ps := nil;

end;