Posted on 2003-03-06
Medium Priority
Last Modified: 2010-05-01
How to write source code with VB6 for preventing illegal copying of softwares through CD-Key verification?
Question by:latecomer
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2

Expert Comment

ID: 8080093
I'm interested in the answer to this one.

Isn't it the case that you can change the CD key, so it's useless.

There are other solutions to this one though that are more simple.

Expert Comment

ID: 8080260

Expert Comment

ID: 8080990
I don't understand.  Do you want to write your own CD-Key verification routine?  So you can release your (ro someone elses) software and use your own CD-Keys?

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 70

Expert Comment

by:Éric Moreau
ID: 8081940

Author Comment

ID: 8110680
Yes, a verification routine for release of own software.


Expert Comment

ID: 8111214
latecomer, the link given by emoreau is a link to an open source, freeware project with exactly what your asking for.  If you want to get in on the discussion group, you can send a blank email address to


If you want to download the sourcecode, you can do it here.


If on the otherhand you want to develop one on your own, I suggest that you start looking into encryption.  It will give you ideas on how to develop a Key making solution.  But I am telling you that any currently used copy protection methods can be bypassed.  Key systems I know in particular are easy to do.  

When someone enters a CD key for your program, the Key routines can either create a new CD key to compare to the one entered or take the one entered and tear it down.  Either way at some point, there is a comparison done.  You can set up an assembler program to watch for such comparisons and stop execution at that time.  The person then looks at the two memory locations that are being compared.  At one memory location will be his CD-Key and at the other memory location will be the correct CD-Key.  So now he has a REAL CD-Key, he just reruns the registration.

The only reason I am explaining this is because it would be a shame to put a LOT of energy into something that will be bypassed.  So why not use one that already exists and is free, like what emoreau suggested.

Good Luck,

Author Comment

ID: 8115435
Asmodius, the link provided by emoreau is quite interesting. Any comments on whether this can be bypassed.
How does one tear down a CD-Key protection in softwares?
By VB source code or other means? Please explain further. Know of any current research on how to plug the hole or improve the key method?
Regards from latecomer
LVL 70

Expert Comment

by:Éric Moreau
ID: 8115780
Anything you will do can be bypassed by a real hacker! You need to ask yourself what is the benefit for them to hack your application?

Author Comment

ID: 8202403
I've seen some source codes for this problem. They all seem to be quite complex. Do I understand correctly that you 've other solutions that are simpler? Please elaborate. Thanks

latecomer 25/3/03

Accepted Solution

VD earned 225 total points
ID: 8202786

My method may be too simple, or too time consuming, but it's very effective.

If it's purely to protect your software, I don't think you should be too bothered about the originality of the CD it self... who cares if it is copied lots of times, it saves you sending new ones to people.

The solution is very simple... have a random code generator produce a 16 key code (four sets of four), this code can then be saved by the programme, or re-generated if the user requires.  Three attempts at the 16 key code and it will automatically change to a new key code.

Allow the user to print this code out, and either telephone, email or fax it to your offices, a reply with the "pass key", if you are happy that this user is genuine.

The advantages of this is, that these keys you give, can unlock the software indefinately, for a month, for a week, give access to certain, or what ever you program it to be.

It's a simple to produce, and gives you lots of flexibility.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question