## QPix v2.2x | ## Introduction

# Adding and Removing licenses

[In QPix, QMedia, QMediaLight, QGrid and QDrop versions released in April 2002 or later]

Adding a license key in single-user

In single-user mode, the first time a plug-in command is called by the application, the plug-in will examine its licensing status. If a license key is needed for normal operation, a dialog will be displayed automatically. In the example that follows, the following dialog shows up to request a QPix developer key (or QPix will run as demo):

| Step 1 By clicking on Demo, QPix will run for 30 minutes in demo mode. If you have a license key at hand, you can proceed with installing it. Click on Install key and you will get to the next step.

Step 2 Type or paste the license key into the entry area in this dialog, as prompted. When done, click on Next to proceed to the next step. Attention: This dialog accepts both the new (long, mixed-case) keys issued specifically for QPix 2.2, as well as the old (16-char, caps only) keys issued for QPix 2.0x or 2.1x. If you are upgrading from QPix 2.x to QPix 2.2, all you have to do is type or paste here the license key that you were passing as a parameter to the obsoleted QPx_Register (QPxObs_Register) command. |

| Step 3 The license key that you have entered has been decoded and its details are now displaying in the dialog. This step allows you to review the details of the license key and make sure you are installing the right one.

Step 4 The QPix Developer key for MacOS has been installed. Click on Cancel if you have no more license keys to add to this database, or click on OK to install more keys to this database. The procedure is the same for all types of license keys, all plug-ins and all platforms. |

Escape Licenses Manager: the control panel for plug-in license keys

There's a place where you can review and modify the license keys of all Escape plug-ins in a database: the Escape Licenses Manager (ELM) window. In single-user the ELM window can be invoked on startup of the database, by keeping CapsLock and Shift pressed.

In single-user the ELM window looks like this:

License keys are divided in two groups:

- Programmer keys are those maintained by the programmer: Developer keys, Engine keys (unlimited Runtimes) and OEM keys.
- End-user keys are those maintained by end-users: Runtimes and Server Expansions.

Adding and removing keys in client/server

In client/server all license key administration is done from the Escape Licenses Manager. In client/server the ELM window also has a second page that shows dynamically the seat usage of Server Expansions.

In client/server the ELM window looks like this:

| In order not to block 4D Server (especially when it runs as a service), licensing-related warnings and alerts are not displayed on 4D Server. The administration of plug-in licenses is done exclusively from the ELM window, which is accessible through the Escape menu on 4D Server's menu bar.

Where is licensing information stored?

Programmer-supplied keys (Developer, Engine, OEM) are stored in the structure file and they stay there until removed by the programmer. License keys remain unaltered as the structure goes through compilation, merging with 4D Engine, renaming, or even compacting with 4D Tools.

End-user-supplied keys (Runtime, Server Expansion) are stored in a file inside the Escape folder that is created inside the ACI/4D folder. The name of this file is produced based on the name of your database using the following method (in pseudo-code):

1. Strip extension (.comp on Mac, .4DB, .4DC, .EXE on Win)
2. Replace all non-alpha characters with underscores -> Name2
3. Strip all underscores -> Name3
4.
If Length(Name2) >= 2 then Name2 -> Name4
Else if Length(Name3) >= 2 then use Name3 -> Name4
Else Original Name -> Name4
5. Truncate Name4 to 27 chars and append .QLC extension