HexLicense for Delphi Full Source

HexLicense for Delphi Full Source
HexLicense for Delphi Full Source

You have a killer application and want to get it onto the marketplace. But how will you deal with serial numbers? How will you handle trial periods? How will you generate serial numbers in bulk for your publisher?

This is where our license software comes in. Turning your application into a trial version is now a matter of adding some components, setting a few properties – and then deciding what to disable in your code during the trial.

With plenty of events and straight forward mechanisms, saves you a lot of time!

HexLicense components

Our components are all about generating serial numbers, validation and establishing trial periods from within your Delphi application. How you store the license data is up to you. If you want to handle the license data yourself, just drop a THexOwnerLicenseStorage component and take charge via the event handlers.

This model gives you the benefit of not having to deal with the low-level stuff (like encryption, data signatures, date and time checking, file validation etc). You also have ample freedom to expand how data is managed, so you are not boxed into our way of doing things.

If you have a custom server solution or ordering system online, you can easily extend serial-number validation by calling your server to check usage. You can also use the license generator to create as many serial numbers (based on a root key) as you wish. These lists can be uploaded to all major merchant systems, making sure each customer is assigned a single, unique serial number on purchase.

Component driven development
The entire package consists of seven non-visual components and the license generator application. Starting to use the package is a matter of dropping the desired components on a form, starting the generator application, generating a root key and a bulk of serial numbers, pasting the root-key into your code and setting the trial mode.

Quick overview
THexlicenseTHexLicense is the central component. It allows you to define the trial mode (fixed time range, day trial, run trial) and it’s values. You can also set it to automatically start on loading, which means you don’t have to manually call the component for it to initialize. This component must be connected to a THexSerialNumber component and a THexLicenseStorage adapter.

THexSerialNumberTHexSerialNumber deals exclusively with the serial number. In order for this component to do its work it must be connected to a THexSerialMatrix component.

THexSerialMatrixTHexSerialMatrix is the component that handles the “root key”. You provide the root-key via an event handler. The root key is generated with the serial-number generator application that ships with the package (you can also write your own).

THexFileLicenseStorageTHexFileLicenseStorage inherits from THexLicenseStorage and provides automatic read, write and creation of license files for the local file-system. Please note that this component is sensitive to the security permissions of the running application.

THexRegistryLicenseStorageTHexRegistryStorage inherits from THexLicenseStorage and allows you to automatically read, write and create a license file in the Windows registry. Much like THexFileLicenseStorage it is subject to the same security permissions as the running application.

THexOwnerLicenseStorageTHexOwnerStorage inherits from THexLicenseStorage and allows you to override and take charge of the read, write and create process. Due to the changes in Windows during the last 8 years it is highly recommended that you work with this component, since both registry and fixed path IO is discouraged in modern software development. Using this component allows you fill freedom in where you store the license data, only security permissions and creativity sets boundaries.

THexSerialGeneratorTHexSerialGenerator is the component used by the license key application to create new keys and produce serial numbers in bulk. It exists as a component so it can be easily added server-side if you already have an existing ordering system and user-database available.

Users of Guests are not allowed to comment this publication.