I want to generate a SmartKey with network instances, but the function WLGenLicenseSmartKey does not include the network instances parameter. How can I do it?

<< Click to Display Table of Contents >>

Navigation:  WinLicense > FAQ > Registration > Network Instances >

I want to generate a SmartKey with network instances, but the function WLGenLicenseSmartKey does not include the network instances parameter. How can I do it?

The current format of the SmartKeys does not support Network Instances specifically (it is supported in the newer Dynamic SmartKeys). But there is a workaround to limit a SmartKey to a specific number of instances inside a network.

 

If you are going to generate a SmartKey from inside the "WinLicense License Manager" and you put a network instances limit in a SmartKey, WinLicense will explicitly put a special string in the beginning of the Custom Data field to identify the network instances limit in the SmartKey.

 

If you want to create SmartKeys with network instances limit from outside the WinLicense License Manager (via WLGenLicenseSmartKey), you have to enter the network instances limit as follow: *NL*%4x, that is, "*NL*" + four bytes number in hexadecimal format, which specifies the number of instances in a network. If for example, you want to generate a license with the "MODE:Test" string in the custom data and you also want to limit the SmartKey with 12 instances in a network, you have to pass the following string in the Custom Data parameter to the WLGenLicenseSmartKey API as follow:

 

*NL*000CMODE:Test

 

Where "*NL*000C" means 12 instances (000C hexadecimal = 12 decimal)

 

Note: When you call the API WLRegGetLicenseInfo, WinLicense will return the Custom Data information from the license but without the "*NL*%4x" information.