Show/Hide Toolbars

Licence Protector 5

 

Name

RemainingDays                                                                                    

Purpose

Gets the remaining days to the date when the module expires.

Params

Parameter

Type

Example

Note

ModuleID

String

D1003

Unique ModuleID – identifies the module to be tested

Returncode

Returncode

Type Integer

Note

-1

The module never expires (no time limitation)

0 to 2147483648

Days that are left to use the module. If the module has expired then the return value is 0 and you got a return code of 16 or 17 at the preceding validate, validateEx or ValidatesYes

Usage

E.g. to show the user when a part of your software isn’t usable any more.

Sample

 

  iRes := lic.Validate(‘D1003’, ‘’, false);  

  if ((iRes = 0) or (iRes = 1)) then

  begin

     iDays := lic.RemainingDays (‘D1003’);

     if iDays = -1 then

     begin

        << module never expires >>

         ...

     end

     else

     begin

        << module expires in iDays >>

        ...

     end

  end

  else

  begin

     << an error occurred, perhaps the module already has expires >>

     ...

See also

Validate, ExpiredOn, NoOfDays