Well, I am doing this. My application is on Delphi.
DaysBetweenChecks := 365;GracePeriodLength := 14;ta := TurboActivate.Create('5a22f5c8597039fad88934.00488650');gr := ta.IsGenuine(DaysBetweenChecks, GracePeriodLength, true);isGenuine := (gr = Genuine) or (gr = GenuineFeaturesChanged) or (gr = InternetError);
IF (isGenuine) THEN BEGIN Exp_date := ta.GetFeatureValue('licence_expired', ''); if (Exp_date = '') or (not ta.IsDateValid(Exp_date, TA_HAS_NOT_EXPIRED)) then begin IsActivated := 0; end else begin try IsActivated := 1; d := StrToDateTime(Exp_date, MySettings); cnt := DaysBetween(Trunc(Now), Trunc(d)); if cnt < 4 then MessageBox(GetDesktopWindow, PChar('???? ???????? ?????????? ????? ' + IntToStr(cnt) + ' ???!'), PChar('????????!'), MB_OK + MB_ICONSTOP); except on E : Exception do MessageBox(GetDesktopWindow, PChar('?????? ??? ??????? ????-??????. ?????????, ??????????, ? ????????????? (info@shopuchet.kz): ' + E.Message), PChar('????????'), MB_OK + MB_ICONSTOP); end; end; END ELSE BEGIN trialFlags := TA_SYSTEM or TA_VERIFIED_TRIAL; trialDaysRemaining := 0; Try ta.UseTrial(trialFlags); // get the number of remaining trial days trialDaysRemaining := ta.TrialDaysRemaining(trialFlags); except on E : ETurboActivateException do begin try trialFlags := TA_SYSTEM or TA_UNVERIFIED_TRIAL; ta.UseTrial(trialFlags); trialDaysRemaining := ta.TrialDaysRemaining(trialFlags); except on E : ETurboActivateException do begin MessageBox(GetDesktopWindow, PChar('?????? ??? ??????? ????-??????. ?????????, ??????????, ? ????????????? (info@shopuchet.kz): ' + E.Message), PChar('????????'), MB_OK + MB_ICONSTOP); IsActivated := 0; end; end; end; end;
if trialDaysRemaining = 0 then IsActivated := 0 else IsActivated := 1; END;