Tuesday, February 07, 2006

In one of the comments to the post “Licensing classes in the SDF v2 (part 2)” a user asked a question about a way to tie up the license to the particular device and prevent coping licensed component or application between different user devices. This requirement would make the licensing process a little bit more complicated by adding a few more steps. It is driven by the fact that you will need to include the device id into the license key which later is signed with your private key. Evidently, you will have to add some code in your application that:


1. Will retrieve this device id (that's the easy part - just use the OpenNETCF.WindowsCE.DeviceManagement.GetDeviceid) and either automatically send it to your server or display it to the user.
2. Generate and sign the license that includes the device id with your private key.
3. Send this license to the user.
4. During validation of the license, retrieve the device id and include it into validation.

In order to utilize the Licensing library, you will need to create a new license provider by inheriting from the LicenseProvider class. Also you can either modify the .lic file by adding the DeviceID tag into the xml or append the device id to the contents of the .lic file during validation. If my schedule permits I'll try to add this implementation to the base library.

2/7/2006 2:11:21 PM (GMT Standard Time, UTC+00:00)  #     |