Click here to Skip to main content
15,071,262 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I wrote an application last week. And I want it runs on others' computer only one month unless he charge the account.
What code shall I write in my application ? Please show me your code or give me a link to download (developing in vc6.0).
Thank you in advance.
Posted
Updated 26-Jun-10 23:44pm
v4

This has been been asked and answered many times on CodeProject, search the forums.

There are a number of ways to achieve this, each with its own p+c's.

1) basic timestamp, when your application is first run, record a timestamp somewhere e.g. config file, and also some form of license key is required to confirm authentication of purchase

2) Same as #1, but encrypt the file in some way

3) use the registry and bury deep in some obscure location license information and time stamping

4) use one way hashes to genterate the license keys etc. when the app is first run it creates a random installation ID, this + users name/email is + a license key from you is required to make all the pieces come together and validate using some algorithm

5) require challenge response mechanism via the internet to authenticate use

6) use a 3rd party license control to implement the function

7) use 3rd party dongle to implement the license mechanism

That should get you thinking and of to start coming up with some code to try.
   
v2
You need to put in license option in your application.

There are different ways to achieve this
1) encrypted license files that contains the expiry dates etc.
2) encrypted license keys held in the registry
3) challenge/response mechanism which require an internet connection
4) probably others.......


Have a look at these: License Key Generation[^] or: How can I create a Product Key for my C# App[^] or: c# Licensing[^]
They are in C# which can be looked at for starting.

Also,
Cryptography 101 for the .NET Framework[^]
Hope this helps.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900