Recent

Author Topic: Onguard Win64  (Read 34298 times)

wcleyton

  • Jr. Member
  • **
  • Posts: 80
Onguard Win64
« on: February 03, 2014, 02:29:32 pm »
I try install on win 7 x64 & Lazarus-1.0.12 win64
When I compile, in ogutil.pas on this function "function SimulateRealModeInt"

Code: [Select]
  xor     bx,bx
  mov     bl,IntNo
  xor     cx,cx       {StackWords = 0}
  les     di,Regs    {-> ERROR on this line}
  mov     ax,0300h
  int     31h
  jc      @@ExitPoint

  xor     ax,ax
@@ExitPoint:

on this line stop compiling and this errors in message box. I think problem is in asm code for not x64. Has anyone fix this or any idea ?

Code: [Select]
C:\tponguardfpc\source\ogutil.pas(357,14) Error: Asm: Opcode les not in table
C:\tponguardfpc\source\ogutil.pas(375,22) Error: Identifier not found "GlobalDosAlloc"
C:\tponguardfpc\source\ogutil.pas(379,39) Error: Incompatible types: got "FarPointer" expected "PMediaIDRec"
C:\tponguardfpc\source\ogutil.pas(380,39) Error: Incompatible types: got "FarPointer" expected "PMediaIDRec"
C:\tponguardfpc\source\ogutil.pas(381,18) Hint: Local variable "Regs" does not seem to be initialized
C:\tponguardfpc\source\ogutil.pas(383,13) Error: Illegal type conversion: "PMediaIDRec" to "OS"
C:\tponguardfpc\source\ogutil.pas(384,13) Error: Illegal type conversion: "PMediaIDRec" to "OS"
C:\tponguardfpc\source\ogutil.pas(396,18) Error: Identifier not found "GlobalDosFree"
C:\tponguardfpc\source\ogutil.pas(396,19) Error: Illegal type conversion: "PMediaIDRec" to "OS"
C:\tponguardfpc\source\ogutil.pas(404,50) Hint: Local variable "MR" does not seem to be initialized
C:\tponguardfpc\source\ogutil.pas(1870) Fatal: There were 8 errors compiling module, stopping

wcleyton

  • Jr. Member
  • **
  • Posts: 80
Re: Onguard Win64
« Reply #1 on: February 04, 2014, 01:21:17 pm »
Any idea?

How to install TPOnguard in Win64?

 %)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Onguard Win64
« Reply #2 on: February 04, 2014, 04:17:03 pm »
Probably you need to port it to Windows first.

It seems that TPOnguard is built on 16-bit realmode layers of Win3.1 that were still present in Win95 and 32-bit Windows NT...Win8. But not in the 64-bit editions.

Probably it needs specific knowledge about what onguard tries to do, and reprogram that from the ground up.

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Onguard Win64
« Reply #3 on: February 04, 2014, 05:18:20 pm »
If you scroll up you'll find something like:
Code: [Select]
{$IFNDEF LINUX}
{$IFNDEF Win32}

and if you scroll down a little bit, you should see:
Code: [Select]
{$ENDIF}
{$ENDIF}

Change them to:
Code: [Select]
{$IFNDEF LINUX}
{$IFNDEF Win32}
{$IFNDEF Win64}

Code: [Select]
{$ENDIF}
{$ENDIF}
{$ENDIF}

That should take this part out on Windows 64 bit as well. That is my guess.

Edit:
My guess is related to the source code linked here http://wiki.freepascal.org/OnGuard#Download
« Last Edit: February 06, 2014, 02:34:09 am by engkin »

TurboRascal

  • Hero Member
  • *****
  • Posts: 672
  • "Good sysadmin. Bad programmer."™
Re: Onguard Win64
« Reply #4 on: February 05, 2014, 10:30:45 pm »
Quite interesting to find such a bit of 16-bit assembly in a reasonably recent delphi component... And using real mode call int 31h nonetheless... %)
Regards, ArNy the Turbo Rascal
-
"The secret is to give them what they need, not what they want." - Scotty, STTNG:Relics

stoppok

  • New Member
  • *
  • Posts: 18
Re: Onguard Win64
« Reply #5 on: February 07, 2014, 11:28:55 am »
There are different version of onguard available. From my point of view this one looks most promising, but I did not test it right now:

  https://github.com/graemeg/onguard

Little bit OT:

Does anybody know if it's possible to use OnGuard for "online activation"? I'm thinking about developing a solution for that but it's quite time consuming and I don't want to reinvent the wheel.

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: Onguard Win64
« Reply #6 on: February 07, 2014, 12:50:58 pm »
There are different version of onguard available. From my point of view this one looks most promising, but I did not test it right now:

  https://github.com/graemeg/onguard

Little bit OT:

Does anybody know if it's possible to use OnGuard for "online activation"? I'm thinking about developing a solution for that but it's quite time consuming and I don't want to reinvent the wheel.
I also planned to ask similar questions:
- what is the version of OnGuard to be used?
- is OnGuard reliable?
- on which systems it can be used?
- do lazarus developers actually use it for commercial shareware applications?
- what are the alternatives?
-why CodeTyphon Lazarus distribution does not include OnGuard? I mean, they include almost all relevant components from Lazarus community, why not OnGuard? Is there some problem?
- is OnGuard just out-dated ?

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: Onguard Win64
« Reply #7 on: February 07, 2014, 12:51:31 pm »
There are different version of onguard available. From my point of view this one looks most promising, but I did not test it right now:

  https://github.com/graemeg/onguard

Little bit OT:

Does anybody know if it's possible to use OnGuard for "online activation"? I'm thinking about developing a solution for that but it's quite time consuming and I don't want to reinvent the wheel.
I also planned to ask similar questions:
- what is the version of OnGuard to be used?
- is OnGuard reliable?
- on which systems it can be used?
- do lazarus developers actually use it for commercial shareware applications?
- what are the alternatives?
-why CodeTyphon Lazarus distribution does not include OnGuard? I mean, they include almost all relevant components from Lazarus community, why not OnGuard? Is there some problem?
- is OnGuard just out-dated ?

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Onguard Win64
« Reply #8 on: February 07, 2014, 02:33:42 pm »
The version of OnGuard you used is out of date. For the purposed of my work and customers, I started to maintain my own version of OnGuard. It can be found here:
  https://github.com/graemeg/onguard

I can confirm that it does work on 32-bit and 64-bit Windows,Linux and FreeBSD.

Why I started my own repository.... Simply because at the time I couldn't find where or who is "officially" maintaining OnGuard for Free Pascal. Also the original port to Lazarus made it very Lazarus LCL specific. I wanted to use it in a console app and with fpGUI Toolkit. This was achieved.

Reading your other replies I thought I need to extend my answer. Answered in the order that you asked the questions:

* You are welcome to use my version of OnGuard. ;-)
* Yes, I found OnGuard very "reliable". Not really sure what you mean by that. Lets just say I find it very useful and does what it says on the tin.
* I use it on Windows, Linux and FreeBSD. Both in 32-bit and 64-bit flavours.
* Yes, I use OnGuard for commercial applications - actually that is the only use for OnGuard that I have. I wouldn't want to lock down free or open source software. ;-)
* At the time of my research I couldn't find any alternatives. Especially if you want cross-platform support.
* You'll have to ask the CodeTyphon guys that. Probably the same issue I had... couldn't find the "official" maintained version for Free Pascal. Again, they are welcome to grab a copy from my repository. I welcome contributions too.
* The Lazarus version that you used - yes. The project as a whole could probably do with a bit more TLC, but my time is very limited these days.

Hope that helps a bit.
« Last Edit: February 07, 2014, 03:02:35 pm by Graeme Geldenhuys »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: Onguard Win64
« Reply #9 on: February 07, 2014, 03:38:04 pm »
The version of OnGuard you used is out of date. For the purposed of my work and customers, I started to maintain my own version of OnGuard. It can be found here:
  https://github.com/graemeg/onguard

I can confirm that it does work on 32-bit and 64-bit Windows,Linux and FreeBSD.

Why I started my own repository.... Simply because at the time I couldn't find where or who is "officially" maintaining OnGuard for Free Pascal. Also the original port to Lazarus made it very Lazarus LCL specific. I wanted to use it in a console app and with fpGUI Toolkit. This was achieved.

Reading your other replies I thought I need to extend my answer. Answered in the order that you asked the questions:

* You are welcome to use my version of OnGuard. ;-)
* Yes, I found OnGuard very "reliable". Not really sure what you mean by that. Lets just say I find it very useful and does what it says on the tin.
* I use it on Windows, Linux and FreeBSD. Both in 32-bit and 64-bit flavours.
* Yes, I use OnGuard for commercial applications - actually that is the only use for OnGuard that I have. I wouldn't want to lock down free or open source software. ;-)
* At the time of my research I couldn't find any alternatives. Especially if you want cross-platform support.
* You'll have to ask the CodeTyphon guys that. Probably the same issue I had... couldn't find the "official" maintained version for Free Pascal. Again, they are welcome to grab a copy from my repository. I welcome contributions too.
* The Lazarus version that you used - yes. The project as a whole could probably do with a bit more TLC, but my time is very limited these days.

Hope that helps a bit.
Dear Graeme,
Thank you for the straightforward answers!
Yes, I understand your time is limited - and it is amazing how muchyou have already provided for the community:-)

Have you tried OnGuard with MacOS?
is it even fisible?
Thanks again.

stoppok

  • New Member
  • *
  • Posts: 18
Re: Onguard Win64
« Reply #10 on: February 07, 2014, 03:58:13 pm »
Hello Graeme,

glad to see you jumped into this thread:-)

I'm currently searching for an alternative to a commercial solution and your answers are very helpful. Maybe you can answer two more questions.

a) "reliability": I want to distribute my software worldwide to companys and possibly some customers will try to extend the evaluation period or use the software on more PC's as allowed. So the question is: Is the binding to the PC hardware really working or is any "advanced user" able to circumvent the protection by just changing a one or two registry keys?

b) "Activation": Taking a look at the documentation and the demo's the Workflow seems to be

  1) Deliver software and serial number to customer
  2) Get the machine id of customer PC by email
  3) Send email with release code back to the customer

This is fine until you are in direct contact with the customer but I think the tasks 2 & 3 should be automated as soon as you are working with resellers and have customers in a totally different time zone.

Question: Are you aware of any components to achieve my goal?

Thanks in advance

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: Onguard Win64
« Reply #11 on: February 07, 2014, 04:20:34 pm »
just a stupid notion: it is of relevance that people are really concerned how to distribute commercial software made in Lazarus --> this means that that Lazarus is really mature and valid for making commercial applications.

stoppok

  • New Member
  • *
  • Posts: 18
Re: Onguard Win64
« Reply #12 on: February 07, 2014, 04:30:14 pm »
:-)

You're right, it is ready now and since I followed lazarus from the very beginning I'm really glad about that. Will take some time to migrate my projects but I'm now starting to do so.
Seems to be time to make a donation instead of buying another version of Delphi

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Onguard Win64
« Reply #13 on: February 07, 2014, 04:45:20 pm »
Have you tried OnGuard with MacOS? is it even fisible?
I haven't personally tried it. It might compile, but maybe not work 100%. The thing that pops in might is the hardware detection. Even under Linux & FreeBSD there are some scope for improvements. Linux is pretty damn stupid in that it wants you to be root to easily read the hard drive serial number. Also various distros have various layouts. FreeBSD is way more consistent so is slightly easier. 

Now thinking about it further, seeing hat MacOS was based on FreeBSD, the hardware detection might just work out of the box. Many other information gathering uses Free Pascal's built-in functions.

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Onguard Win64
« Reply #14 on: February 07, 2014, 04:48:19 pm »
evaluation period or use the software on more PC's as allowed. So the question is: Is the binding to the PC hardware really working or is any "advanced user" able to circumvent the protection by just changing a one or two registry keys?
It works well for us in a commercial environment.


Quote
  2) Get the machine id of customer PC by email
  3) Send email with release code back to the customer
This part can easily be automated. You could even implement a "registration web service" if you want. Doesn't need to be complicated, just a simple credentials lookup and then return a unlock code. You can use Indy or any TCP/IP components to accomplish this.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018