WLGenLicenseRegistryKeyEx

<< Click to Display Table of Contents >>

Navigation:  WinLicense > WinLicense SDK > Generators Functions >

WLGenLicenseRegistryKeyEx

The WLGenLicenseRegistryKeyEx function generates a license key that will work in a specific application.  The generated license key should be directly copied into a .reg file. When a user clicks on the .reg file, the license information will be inserted in a custom registry key to register an specific application.

Click to expand/collapseShow C/C++ function definition
Click to expand/collapseShow Delphi function definition
Click to expand/collapseShow Visual Basic function definition
Click to expand/collapseShow C# (.NET) function definition

 

Parameters

 

pLicenseHash

[in] Pointer to a null-terminated string that specifies the unique License hash to generate specific keys for an application.

 

pUserName

[in] Pointer to a null-terminated string that specifies the registration name for the license key to generate.

 

If this parameter is zero, the generated key will not have registration name information.

 

pOrganization

[in] Pointer to a null-terminated string that specifies the organization name for the license key to generate.

 

If this parameter is zero, the generated key will not have organization name information.

 

pCustomData

[in] Pointer to a null-terminated string that specifies the custom data for the license key to generate.

 

If this parameter is zero, the generated key will not have custom data information.

 

pMachineID

[in] Pointer to a null-terminated string that specifies the machine ID to lock the license key to a specific computer.

 

If this parameter is zero, the generated key will work in every computer (no machine locking).

 

pLicenseFeatures

[in] Pointer to a sLicenseFeatures structure which contains the license restrictions.

 

pKeyName

[in] Pointer to a string that holds the registry key name where the license key is stored.

 

pKeyValueName

[in] Pointer to a string that holds the registry key value name where the license key is stored.

 

pBufferOut

[out] Pointer to a buffer that will hold the generated license key. If this parameter is NULL, the function returns the required buffer size.

 

This buffer should be copied directly into a .reg file, making it the license key that will activate when a user clicks on this .reg file.

 

 

Return Values

 

If the function succeeds, the return value is the number of bytes in the generated license key.

 

If the function fails, the return value is 0.

 

 

See Also

 

WLGenLicenseRegistryKey, WLGenLicenseFileKey, WLGenLicenseTextKey, WLGenLicenseSmartKey