Look at Microsoft SLP Services

SLP services addresses: 1) protecting intellectual property(Code) from reverse engineering, 2) providing a secure licensing enforcement and management system. SLP Services offers the following 3 core components: 1) SLP Server enables software vendors to host their own license management servers. 2) SLP Online Service enables software vendors to perform license management tasks without hosting their own servers. 3) SLP Code Protector protects our code from reverse engineering.
Next Recommended Reading Look at Microsoft ESP SDK