WLGenLicenseTextKey

<< Click to Display Table of Contents >>

Navigation:  WinLicense > WinLicense SDK > Generators Functions >

WLGenLicenseTextKey

The WLGenLicenseTextKey function generates a license key that will work in a specific application.  The generated text key should be passed as a parameter to the function WLRegInstallTextKeyToFile or WLRegInstallTextKeyToRegistry to register a 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).

 

NumDays

[in] Number of days to restrict the use of the generated license key.

 

If this parameter is zero, the generated license key will not have a days restrictions.

 

NumExec

[in] Number of executions to restrict the use of the generated license key.

 

If this parameter is zero, the generated license key will not have an executions restrictions.

 

pExpirationDate

[in] Pointer to a SYSTEMTIME struct that holds the expiration date for the generated license key.

 

If this parameter is zero, the generated license key will not have a date expiration restrictions.

Click to expand/collapseNote for C# developers

CountryId

[in] Country ID value to restrict the generated license key to a specific country.

 

If this parameter is zero, the generated license key will work in every country.

 

Runtime

[in] Runtime restriction in minutes for the generated license key. The registered application will only run Runtime minutes in every instance in memory.

 

If this parameter is zero, the generated license key will not have a runtime restriction.

 

GlobalTime

[in] Global time restriction in minutes for the generated license key. The registered application cannot be executed more than GlobalTime minutes in general.

 

If this parameter is zero, the generated license key will not have a global time restriction.

 

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.

 

 

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

 

WLRegNormalKeyInstallToFile, WLRegNormalKeyInstallToRegistry, WLRegNormalKeyCheck, WLGenLicenseRegistryKey, WLGenLicenseSmartKey, WLGenLicenseFileKey