Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Protection Plus for Clipper - <u>pp_copychk()</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PP_COPYCHK()
Verify the copy protection
------------------------------------------------------------------------------

Syntax
  PP_COPYCHK()  .  lResult

Returns
  .T. if successful, else .F.

Description
  Test the value of the copy protection stored on disk and
  compares it to the application.  This is a system file that is
  hidden to the user.  The user will not be able to decode this
  encryption.  The protection will be different for every piece of
  software for every library sold, every computer out there, and
  every serial number of your application.  If you find a duplicate,
  please let us know so that we can write Guiness!

Example

If you would like to revert this program to a demo version in the even
that copy protection is invalid or not found, simple create a PUBLIC
variable and code the following.

demo_ver = !pp_copychk()

If you want the program not to work, code the following.  Keep in mind
that when the user first installs the software, there will not be any
copy protection on his hard drive.  He will need to call you first to
create the appropriate file.  So, you will never be able to just
"terminate" an application if copy protection is not found.  Because
of this, refer to the function PP_UCODE() on how to integrate this.

clear
get_code=0
If !pp_copychk()
    @ 10,10 say "Enter code: " get get_code
    read
    if pp_ucode(get_code)=1
        pp_copywrite()
    else
        clear
        cancel
    endif
endif

See Also: PP_COPYWRITE() PP_KILLPROT() PP_UCODE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson