Developing own licensing system may appear to be more complex and elaborate task than it seems from the first sight. It is better to use the solutions that are already present on the market to save lots of your time and money.
Check the http://activation-cloud.com if your product is running under Windows (Linux is coming soon) and is written on C++.
It does good a job for copy-protection (keeps computer IDs on the server). We are working on decent anti-crack protection at the moment.