WLGenTrialExtensionFileKey

<< Click to Display Table of Contents >>

Navigation:  WinLicense > WinLicense SDK > Generators Functions >

WLGenTrialExtensionFileKey

The WLGenTrialExtensionFileKey function generates a trial extension key to extend the current trial period in a specific application. The generated trial extension key should be copied directly into a file, making it the trial extension file to extend the trial period in 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

 

pTrialHash

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

 

Level

[in] Trial extension key level.

 

The trial is extended by levels to allow developers a full control of the extended keys that they generate. When a user asks for an extension key, the first level should be zero. If the same user asks again for an extension key, only extension keys with levels greater than zero will work. In general, to allow a trial period extension, only extended keys with a Level greater than a previous one will work. This will avoid being cheated by users re-asking for a trial extension key.

 

NumDays

[in] Number of days to extend the trial period.

 

NumExec

[in] Number of executions to extend the trial period.

 

pNewDate

[in] Pointer to a SYSTEMTIME struct that holds the new trial expiration date.

 

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

Click to expand/collapseNote for C# developers

GlobalTime

[in] Number of minutes to extend the Global time trial.

 

Runtime

[in] Number of runtime minutes to extend the trial.

 

pBufferOut

[out] Pointer to a buffer that will hold the generated trial extension key.

 

This buffer should be copied directly into a file, making it the extension key that will extend the trial in a specific application.

 

 

Return Values

 

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

 

If the function fails, the return value is 0.

 

 

Remarks

 

Only the trial restriction fields that were included in the protection time can be extended. For example, if an application has a trial restriction of 21 days, ONLY the number of expiration days can be extended. Any attempt to extend any other trial restriction not included in the protection time will be ignored.

 

 

See Also

 

WLTrialGetExtensionStatus