Recent

Author Topic: TurboPower OnGuard (Delphi vs. FPC)  (Read 4194 times)

stocki

  • Full Member
  • ***
  • Posts: 144
TurboPower OnGuard (Delphi vs. FPC)
« on: April 19, 2015, 03:57:45 am »
Hi,

RCG compiled with Delphi 7 produces a different Releasecode than compiled with FPC 3.1.1. I don't know why. What I found so far is, that TCode's size is 10 instead of 8. Where is the difference?

best regards
stocki
« Last Edit: April 19, 2015, 03:59:36 am by stocki »

ChrisF

  • Hero Member
  • *****
  • Posts: 542
Re: TurboPower OnGuard (Delphi vs. FPC)
« Reply #1 on: April 19, 2015, 03:12:49 pm »
As, according to the Wiki (http://wiki.lazarus.freepascal.org/OnGuard), Graeme Geldenhuys is the coder for the current version of Onguard for Free Pascal, I guess he'll answer to you better that I can do.

Anyway, if you just have a quick glance ate the source code (i.e. onguard.pas), you'll see that there is an additional field for the TCode record.

"Original" version:
Code: [Select]
  TCode = packed record
    CheckValue : Word;               {magic value}
    Expiration : Word;               {expiration date or 0, if none}
    case Byte of
      0 : (FirstDate    : Word;      {for date code}
           EndDate      : Word);
      ...


Graeme's version (note the new InvalidCount field):
Code: [Select]
  TCode = packed record
    CheckValue : Word;               {magic value}
    Expiration : Word;               {expiration date or 0, if none}
    InvalidCount : Word;             {count of respected invalid code accidents,normally 0}
    case Byte of
      0 : (FirstDate    : Word;      {for date code}
           EndDate      : Word);
      ...


***EDIT ***

Extract of Graeme's ReadMe.txt:
Quote
- initial support for InvalidCount value allowing 'breaking the rules' limited , for example run program a few times if trial period expired
« Last Edit: April 19, 2015, 03:34:31 pm by ChrisF »

stocki

  • Full Member
  • ***
  • Posts: 144
Re: TurboPower OnGuard (Delphi vs. FPC)
« Reply #2 on: April 19, 2015, 04:41:55 pm »
Thanks for the hint! I think it is a bad idea to make fpc's version incompatible to Delphis.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: TurboPower OnGuard (Delphi vs. FPC)
« Reply #3 on: April 19, 2015, 04:46:56 pm »
why doesn't fpc's version compiles with delphi anymore?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

rvk

  • Hero Member
  • *****
  • Posts: 6109
Re: TurboPower OnGuard (Delphi vs. FPC)
« Reply #4 on: April 19, 2015, 04:56:55 pm »
why doesn't fpc's version compiles with delphi anymore?
Maybe it does... but it's never a good idea for such a library to "break" existing licence-codes. There should always be a possibility to keep existing codes valid (maybe with an option). A new version of the software would also mean distributing thousands (if not more) of new licence-codes in this case.

 

TinyPortal © 2005-2018