Results 1 to 13 of 13

Thread: Expiry date for demo product

Threaded View

  1. #10
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    Re: Expiry date for demo product

    ok,here,I just quickly made up a small program to show you....Here,Im storing onto a file everytime the program loads.In this example,the program is allowed to run only 3 times.Its checking if the program is run more than 3 times.If it exceeds 3 times,then,the trial period ends.Well,yes,Its easy to crack it,but,only if they knew the file where im storing on and stuff. I guess almost all softwares today are cracked that ways.
    VB Code:
    1. Dim filenumber As Integer
    2.     Dim times_used As Integer = 1
    3.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    4.         filenumber = FreeFile()
    5.         If IO.File.Exists(Application.StartupPath & "\check.myext") Then
    6.             FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
    7.             FileGet(filenumber, times_used)
    8.             MsgBox("You have executed this software " & (times_used) & " times")
    9.             FileClose(filenumber)
    10.             If times_used >= 3 Then
    11.                 MsgBox("Sorry,Your trial period is over!!")
    12.                 Application.Exit()
    13.             End If
    14.             times_used = times_used + 1
    15.             FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
    16.             FilePut(filenumber, times_used)
    17.         Else
    18.             FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
    19.             FilePut(filenumber, times_used)
    20.         End If
    21.     End Sub
    If this is really that helpful,please tell me so that Ill put a copy in that forum where they submit code Thanks..oh yeah,i wont forget the comments too if im putting there
    Hope this helps...
    Last edited by uniquegodwin; Aug 24th, 2005 at 08:18 AM.
    Godwin

    Help someone else with what someone helped you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width