Protect for Delphi
 
Protect for Delphi Component, by Reinaldo Yañez Arrey.
Copyright © 2000 Reinaldo Yañez Arrey.
All Rights Reserved.
rya@labs.df.uba.ar
 
Version 2.0 - Build 1.  11/2000

 
 

Protect for Delphi (V2.0) is a native Delphi component specially designed to protect your software against piracy. It is part of a registration system that manages the whole registration process. Version 2.0 is now compatible with Windows NT, Windows 2000, Windows 95 and Windows 98. 
As distinctive features, it provides strong encryption for maximum security and it does not read/write information to Windows registry. Extended capabilities of your software can be remote activated by registration key, on user demand. It supports up to 32 independently controlled features, making implementation of unlock levels easier than ever. 

Simple to use, requires no extra programming skills. Only one line of code is needed to achieve full protection for Windows 95, Windows 98 , Windows NT and Windows 2000 programs. Security features include strong users code/data ciphering. 
Allows multiple backups of the protected program that run only on the computer where the program was registered. User can reformat hard disk or upgrade to another operating system without having to ask for a new registration key on reinstallation. 
New source sample code that demonstrates the use of unlock levels. 
Delphi 4 and Delphi 5 versions included in this package, with really simple installation. Full documentation in two languages: English and Spanish. Buy online using SECURE connection.

 
 



The following terms will be used along this document.

License Agreement

This code is shareware. No warranties, express or implied, are provided. The author is not responsible for any problems caused by this component. Use it at your own risk. The author provides no support whatsoever, and is not obligated to any person or corporation for anything related to this software. The author reserves all rights concerning this code. You are free to evaluate it and distribute it for evaluation purposes, if you do not modify any part of it and you distribute all the files as a whole. This code cannot be sold for any purposes, or included in a commercial collection, without the express written consent of the author.
This License Agreement applies to demo version only, please read the the registration section for more information.
By installing these files on your computer, you agree to all above conditions.
 

 Quick start:

What do I need to install the component ?

  Windows 95, Windows 98, Windows NT or Windows 2000  operative system installed.
  4 Mb hard disk space available.
 Delphi 4 or Delphi 5    installed.
 

How to install the component ?
 

1) Unzip the file (Prot4Dph.zip) to some directory, for example
  C:\Protect4Delphi\

2) Install the component in the pallete.

   Delphi 4:
     From Delphi IDE,
     go to menu -> Components -> Install Packages -> 'Add'
     open \Bin\Delphi4\Protect4DelphiV40Demo.bpl
     (or \Bin\Delphi4\Protect4DelphiV40Full.bpl)
     The component should go to the components palette.

   Delphi 5:
     From Delphi IDE,
     go to menu -> Components -> Install Packages -> 'Add'
     open \Bin\Delphi5\Protect4DelphiV50Demo.dpl
     (or \Bin\Delphi5\Protect4DelphiV50Full.bpl)
     The component should go to the components palette.

3) Add the installation directory to Delphi Library Path.

   Delphi 4 & Delphi 5:
     From Delphi IDE do: Tools->Environment options->Library.
     Press the ellipsis button (...) of item "Library Path:"
     Write down the complete installation path and press 'Add' button.
 

Delphi 5 notes. Please READ !
 
 
Depending on your current configuration, you could get the following error message while compiling a protected program with Protect for Delphi (on Delphi 5, only): 

[Fatal error]: File not found 'DsgnIntf.dcu' 

This can be solved by doing this: 
Search the folder Borland\Delphi5\Source\ToolsApi  for the units:  DsgnIntf.pas and Marks.pas, and copy them to your Borland\Delphi5\Lib directory.  That will remedy the error, but please take a while to read the borland delphi 5  readme.txt  file. 

 

 
 

Installation Pack contains:

\Bin
    KeyGenerator.exe                                  (Key Generator)
\Bin\Delphi4
    Protect4DelphiV40Demo.dpk                (Delphi Package)
    Protect4DelphiV40Demo.bpl                 (Delphi package library)
    Protect4DelphiV40Demo.dcp                (Delphi compiled package)
    Protect4DelphiV40Demo.dcu                (Delphi compiled unit)
    Protect4DelphiV40Demo.res
    Protect4DelphiV40Demo.dof
\Bin\Delphi5
    Protect4DelphiV50Demo.dpk                (Delphi Package)
    Protect4DelphiV50Demo.bpl                 (Delphi package library)
    Protect4DelphiV50Demo.dcp                (Delphi compiled package)
    Protect4DelphiV50Demo.dcu                (Delphi compiled unit)
    Protect4DelphiV50Demo.res
    Protect4DelphiV50Demo.dof

  - all versions include -
  UProt4DelphiDefs.dcu
  Prot4Delphi2.dcu
  Prot4Delphi3.dcu
  Prot4Delphi4.dcu
  Prot4Delphi5.dcu
  Prot4Delphi6.dcu
  Prot4Delphi7.dcu
  Prot4Delphi8Cipher.dcu
  Prot4Delphi8KeySchedule.dcu
  Prot4Delphi8SBoxes.dcu
  Prot4Delphi8StaticTable.dcu
  UProt4Delphi.dcu
  UProt4DelphiDefs.dcu
  UDefaultRegistration.pas
  UDefaultRegistration.dfm

\Doc
  Protect for Delphi (English).htm           (Hipertext documentation, English)
  Protect for Delphi (Spanish).htm          (Hipertext documentation, Spanish)
\Demos\Standard                                  (Standard demo)
  Main.pas
  Main.dfm
  UDefaultRegistration.pas
  UDefaultRegistration.dfm
  Simple.dpr
  Simple.res
\Demos\Custom                                    (Custom demo)
  Main.pas
  Main.dfm
  Custom.dpr
  Custom.res
  MyID0010857.uid
\Demos\UnlockLevels
  Main.pas
  Main.dfm
  Readme.txt
  UnlockLevelsDemo.dpr
  UnlockLevelsDemo.dof
  UnlockLevelsDemo.cfg
  UnlockLevelsDemo.res
 

How do I protect a program ?

It's very simple, just follow this 3 steps:

 

How   do I  distribute  the  protected program ?
 

What is seen by the user when the protected program is run ?
  How does the developer generate the registration key ?

Once the developer obtained the registration code from the user, the Key Generator can be run to generate the registration key.
The Key Generator is a program (KeyGenerator.exe) included in the distribution pack.

Figure 2
 
The key generator requires  the application key (blue ellipse) and 2) the registration code sent by the user  (green ellipse). What should the user do with the registration key ? How can the protected program have different unlock levels ? Does Protect for Delphi have multilanguage support ?
  I have problems with the instructions.
Where can I see working samples ?
 

Working samples are in this folders:

\Demos\Standard
 Simple.dpr      (Standard demo)
\Demos\Custom
 Custom.dpr     (Custom demo)
\Demos\UnlockLevels
 UnlockLevels.dpr     (UnlockLevels demo)

To open: In Delphi IDE do (menu) File -> Open -> (go to installation folder) -> (select one of the folders from above) -> (select a .dpr) -> Open.
Compile and run, pressing F9 key.
 

 

What is the pay method for Protect for Delphi ?
What about support and future upgrades ?

Available pay methods are credit card or money order.
There are two registration options:

 1)  Full version. (component, key generator, ID generator)  No nag screens.
      Full features enabled. Registration needed for "Key generator"  and "ID Generator".
      Get special offers (at very low price) for future upgrades.

2)  NEW !!!
     Full version with source code. (component, key generator, ID generator, +Source code!!!).
     No nag screens. Full features enabled. Source code included !!!!
     Receive two months of free technical support, and free upgrades for a year.
 

To register Protect for Delphi:
 

Through GetSoftware:

            http://www.getsoftware.com/cgi/products.gs?vendor=346
            http://www.getsoftware.com/cgi/products.gs?vendor=346

or

            http://www.getsoftware.com/cgi/info.gs?productid=2607
            http://www.getsoftware.com/cgi/info.gs?productid=2607

 


Additional Section:

 

Windows NT, Windows 2000 notes

Protect for Delphi uses a device driver in order to get the hard disk serial number. This device driver was provided as freeware by Alexander Weitzman. The code to access this driver was changed but it is based on his original version.
A user wanting to install a device driver on Windows NT (or Windows 2000) MUST have administrative priviledges, so a protected program should be run first by an administrator or power user. This installs a device driver that is then invoked by common users.
There is a protected program command line parameter  that uninstalls  the device driver from a machine. That parameter is:
/RemoveService
Example:   ProtectedProgram.exe /RemoveService
 
 

Component properties documentation
 

Component properties. Short description.

Methods

 

Properties

Generating unique copy identifiers:
  The solution: Unique copy identifiers.
  How do I generate the unique copy identifiers ?
 
IDGenerator looks like
 
 

This generator requires:

 
License Agreement  

This code is shareware. No warranties, express or implied, are provided. The author is not responsible for any problems caused by this component. Use it at your own risk. The author provides no support whatsoever, and is not obligated to any person or corporation for anything related to this software. The author reserves all rights concerning this code. You are free to evaluate it and distribute it for evaluation purposes, if you do not modify any part of it and you distribute all the files as a whole. This code cannot be sold for any purposes, or included in a commercial collection, without the express written consent of the author. By installing these files on your computer, you agree to all above conditions. 

 
 
 

Additional notes:
 

(C)opyright  2000, Reinaldo Yañez Arrey.
Buenos Aires, Argentina.
rya@labs.df.uba.ar
ryaayr@yahoo.com
 
 
 

IMPORTANT: Demo version limitations
 

1) The demo version pack does NOT include the unique identificators file generator.

2) The messages 'registered', 'not registered' show up with this additional text, that cannot be removed:

This program was copy protected using a Demo version of Protect for Delphi
A protection of this kind is NOT ALLOWED for commercial use.
(C)opyright 2000, by Reinaldo Yañez.
e-mail: rya@labs.df.uba.ar, ryaayr@yahoo.com

3) In the Delphi IDE, when a project containing a TProt4Delphi component is open, this message will be showed:
'Reminder: Prot4Delphi component is NOT registered.'
the message repeats each 30 seconds.

4) The property CheckSecurityEachNSeconds is not connected.
    Security is verified each 60 seconds.

5) The property SupportedCapabilities returns correctly only the first 2 features (Feature 0 and Feature 1). The other features are returned as NOT SUPPORTED.
The key generator can set only this two features.

 

(C)opyright  2000, Reinaldo Yañez Arrey.
Buenos Aires, Argentina.
rya@labs.df.uba.ar
ryaayr@yahoo.com
 
 

About the author:

 Actually I am a physics student at Buenos Aires University. I am working for a company that is dedicated to the development
of sotware for insurance companies and brokers.
At job, I program in Delphi. For my own projects I program in Delphi, C++, C and assembler.
My e-mail address is:  rya@labs.df.uba.ar  ,  ryaayr@yahoo.com.

The system I present was developed based on the need to distribute my own software. Some years ago, when old DOS was used, I created a similar copy protection system, that ciphered the final .exe.
When I began to program in Delphi (which, by the way I consider extraordinary) I could not distribute my soft safely.
Now I feel I built the right tool.

I would like to thank Alexander Weitzman specially, he provided some freeware code and support that helped me a lot to make it work on Windows NT. Documentation is still not so well designed as it should be, so I apologize. However, I wish it could be of some help.

Note: This component uses industrial strength encryption. I have designed a 64 block cipher with 384 (max.) bits of key. It has 128 KBytes of randomly-generated S-BOXES. (I do not believe so much in human made S-BOXES).
 
 
License Agreement 

This code is shareware. No warranties, express or implied, are provided. The author is not responsible for any problems caused by this component. Use it at your own risk. The author provides no support whatsoever, and is not obligated to any person or corporation for anything related to this software. The author reserves all rights concerning this code. You are free to evaluate it and distribute it for evaluation purposes, if you do not modify any part of it and you distribute all the files as a whole. This code cannot be sold for any purposes, or included in a commercial collection, without the express written consent of the author. 
This License Agreement applies to demo version only, please read the the registration section for more information. 
By installing these files on your computer, you agree to all above conditions. 

 

(C)opyright  2000, Reinaldo Yañez Arrey.
Buenos Aires, Argentina.
rya@labs.df.uba.ar
ryaayr@yahoo.com