Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Fri May 15, 2009 6:59 am Post subject: INFO: Testing license codes during development |
|
|
The CCryptoLicense.Load function loads a license code from the specified storage medium (registry or file). When testing a new license (maybe with different settings), you will need to overwrite the old license with the new one.
When storage medium is a file:
Simply replace the old license code in the file with the new code and save the file. The next time the CCryptoLicense.Load function is called, the new license code will be loaded and used. An easier way is to explicitly set the CCryptoLicense.GetLicenseCode function as described below.
When storage medium is the registry :
For the registry, its not possible to overwrite the value since the license code is stored in binary form while the you will have the code in string form. In this case, explicitly set the value using CCryptoLicense.SetLicenseCode function as described below.
Explicitly setting the CryptoLicense.LicenseCode property
In this case, you must explicitly set the new license code using the CCryptoLicense.SetLicenseCode function to ensure that the exact code you want to test will get used. To integrate this in the license validation code of your software, simply set the value using CCryptoLicense.SetLicenseCode function after the call to the CCryptoLicense.Load function. In this way, irrespective of whatever license code is loaded by the CCryptoLicense.Load function, the license code set using the CCryptoLicense.SetLicenseCode function will be the one used and validated. When you are finished testing, simple remove or comment the line with the CCryptoLicense.SetLicenseCode property. |
|