Decrease method
procedure TOgUsageCode.Decrease;

TurboPack OnGuard FMX

Decrease method

procedure TOgUsageCode.Decrease;

Navigation:  »No topics above this level«

Decrease method

procedure TOgUsageCode.Decrease;

Return to chapter overview

         Decrease reduces the usage count value stored in the release code.

Performing this action requires several vital pieces of information, which are normally obtained by triggering several event handlers that you define. The normal sequence of events performed by Decrease is:

1.                Trigger the OnGetKey event to get the key used to encode and decode the release code. The key should always be embedded in the application as a constant.

2.                Trigger the OnGetCode event to get the release code. The code is normally stored in the registry or an INI file.

3.                Trigger the OnGetModifier event to get the key modifier. The key modifier can be stored as a constant in the application, stored in the registry or INI file, or generated when it is needed.

4.                Apply the modifier to the key.

5.                Test the release code to see if it is valid.

6.                Decrease the usage count by one.

7.                Trigger the OnChangeCode event to store the changed release code.

See also: OnChangeCode, OnGetCode, OnGetKey, OnGetModifier,