|
-
Aug 24th, 2005, 08:08 AM
#10
Fanatic Member
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:
Dim filenumber As Integer
Dim times_used As Integer = 1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
filenumber = FreeFile()
If IO.File.Exists(Application.StartupPath & "\check.myext") Then
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
FileGet(filenumber, times_used)
MsgBox("You have executed this software " & (times_used) & " times")
FileClose(filenumber)
If times_used >= 3 Then
MsgBox("Sorry,Your trial period is over!!")
Application.Exit()
End If
times_used = times_used + 1
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
FilePut(filenumber, times_used)
Else
FileOpen(filenumber, Application.StartupPath & "\check.myext", OpenMode.Random, OpenAccess.ReadWrite)
FilePut(filenumber, times_used)
End If
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|