@joak23: Do you want a one way serial, as in it gets sent in a registration email, they paste it in, and off they go? Or do you want to bounce a hardware fingerprint off of a server? Do you need to just activate, or do you want turn on features based on a key?

The only one that I've ever used is a web service based activation scheme. We generated a random key for the user that they put into the software. The software used that to talk back to a web service and sent it a hardware fingerprint. The web service decided if they were supposed to be on a time limited trial or full version and then activated based on which features they were supposed to get. There was an offline implementation that involved license files. It's probably overkill and evil, but...meh.

That was a learning experience, but if you can get away from writing your own, it's probably better. There are some third party solutions that you can plug into your project. That's probably the simplest way to do it.