I have examined and tried several software products for protecting software against illegal copying, reverse engineering etc., but they are all time-consuming and often poor. So I think about making the protection myself, but have no idea how to do that.
Does anyone know a tutorial for this or a book which teaches you the know how for this?
Your help is very much appreciated.

Copy protection usually brings its own set up problems, which I don't care to support in my commercial applications. I imagine that could be a nightmare.

I use a key code, that I build into the installation routine and the program. The code is based on the user and company name, which I know beforehand from the sale. The user and company name are displayed in the splash box and also printed on the program reports. I've found having their name in large type in the header of the reports to be enough to discourage copying.

Doubt this is the answer you wanted, but it may give you some ideas.

What I've done before is to collect system information from the installer. a Product key were supplied with the package. I then e-mail myself with detail as well as the product key.

Should the installation be copied or re-installed, I will receive another mail with some other system info. Obviously you have the e-mail address of first installer, and can now investigate probable theft.