Manual
Delphi ExamplesIn the example, the Enigma API function EP_TrialExecutions is used to return the total and remaining number of trial executions. If the count of remaining executions is below half of the total trial executions, a warning message will be displayed. program test; {$APPTYPE CONSOLE} uses Windows, SysUtils, enigma_ide in 'include\enigma_ide.pas'; var Total, Left : word; sMessage : string; begin // This is test application of trial Enigma API functions // If the function succeed then it returns true // If the function failed then // 1. the trial limit on executions number was not set before protection // 2. here is unexpected error if EP_TrialExecutions(Total, Left) then begin if Left = 0 then begin MessageBox(0, 'Your trial period has over!', 'Test application', 0); end else begin if (Total div Left) >= 2 then sMessage := 'You have left more then half executions of your trial! period'; sMessage := sMessage + format('You have left %d from %d days of your trial period!', [Left, Total]); MessageBox(0, PAnsiChar(sMessage), 'Test application', 0); end; end; // You may also use EP_TrialDays and EP_TrialExpirationDate // functions to control trial period end. |