DecUsageCode
procedure DecUsageCode (const Key : TKey; var Code : TCode);

TurboPack OnGuard FMX

DecUsageCode

procedure DecUsageCode (const Key : TKey; var Code : TCode);

Navigation:  »No topics above this level«

DecUsageCode

procedure DecUsageCode (const Key : TKey; var Code : TCode);

Return to chapter overview

_bm1 DecUsageCode reduces the internal "usage count" value by one and returns the modified code as the Code parameter.

Key must be the same key that was used to create the code or the code is considered invalid.

This routine is defined in the OnGuard unit. (as of 1.15 this routine has been moved to the OgUtil unit)

 

In version 1.15:

If the conditional define OgUsageUnlimited is enabled then a check is made to see if the usage count = 65535 and expiration = 65535 and last change = 1 is set.
If all three conditions are true then the code is treated as an unlimited usage code in which case it is not decremented nor is the last updated date changed.