<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Generators Functions > sLicenseFeatures Definition |
This structure is used in the new license generator functions (with the "Ex" postfix) to give more flexibility to WinLicense to extend the restriction features in upcoming versions of WinLicense. Notice that all fields in the structure are defined as 32-bit length (except the SYSTEMTIME fields) to simplify the migration of this structure to non common compilers.
IMPORTANT: Before calling a license generator function which uses the sLicenseFeatures structure, you must initialize the whole structure to ZERO and assign the sLicenseFeatures.cb field to the size of the structure itself. If you don't initialize the structure to ZERO, it might contain spurious data from memory which could assign non wanted restrictions to your licenses.
typedef struct _sLicenseFeatures { unsigned cb; unsigned NumDays; unsigned NumExec; SYSTEMTIME ExpDate; unsigned CountryId; unsigned Runtime; unsigned GlobalMinutes; SYSTEMTIME InstallDate; unsigned NetInstances; unsigned EmbedLicenseInfoInKey; unsigned EmbedCreationDate; } sLicenseFeatures; |
type sLicenseFeatures = record
cb: LongWord; NumDays: LongWord; NumExec: LongWord; ExpDate: SYSTEMTIME; CountryId: LongWord; Runtime: LongWord; GlobalMinutes: LongWord; InstallDate: SYSTEMTIME; NetInstances: LongWord; EmbedLicenseInfoInKey: LongWord; EmbedCreationDate: LongWord
end; |
Type sLicenseFeatures
cb As Integer; NumDays As Integer; NumExec As Integer; ExpDate As SYSTEMTIME; CountryId As Integer; Runtime As Integer; GlobalMinutes As Integer; InstallDate As SYSTEMTIME; NetInstances As Integer; EmbedLicenseInfoInKey As Integer; EmbedCreationDate As Integer;
End Type; |
Structure sLicenseFeatures
Public cb As Integer Public NumDays As Integer Public NumExec As Integer Public ExpDate As SYSTEMTIME Public CountryId As Integer Public Runtime As Integer Public GlobalMinutes As Integer Public InstallDate As SYSTEMTIME Public NetInstances As Integer Public EmbedLicenseInfoInKey As Integer Public EmbedCreationDate As Integer
End Structure; |
public class sLicenseFeatures { public unsigned cb; public unsigned NumDays; public unsigned NumExec; public SYSTEMTIME ExpDate; public unsigned CountryId; public unsigned Runtime; public unsigned GlobalMinutes; public SYSTEMTIME InstallDate; public unsigned NetInstances; public unsigned EmbedLicenseInfoInKey; public unsigned EmbedCreationDate; } |
Fields definition
cb
Contains the size in bytes of this structutre. This field MUST always contain the size of the sLicenseFeatures structure to help WinLicense determine the number of features available when there are different version of the sLicenseFeatures structure.
NumDays
Number of days to restrict the use of the generated license key.
If this field is zero, the generated license key will not have days expiration.
NumExec
Number of executions to restrict the use of the generated license key.
If this field is zero, the generated license key will not have executions restrictions.
ExpDate
SYSTEMTIME struct that holds the expiration date for the generated license key.
If this struct is all zero, the generated license key will not have date expiration restrictions.
CountryId
Country ID value to restrict the generated license key to a specific country.
If this field is zero, the generated license key will work in every country.
Runtime
Runtime restriction in minutes for the generated license key. The registered application will only run Runtime minutes in every instance in memory.
If this field is zero, the generated license key will not have a runtime restriction.
GlobalMinutes
Global time restriction in minutes for the generated license key. The registered application cannot be executed more than GlobalTime minutes in general.
If this field is zero, the generated license key will not have a global time restriction.
InstallDate
Expiration date to install the license. The user must install the license before the specified InstallDate. If a user tries to install a license after InstallDate the license will be rejected.
If this struct is all zero, the generated license key will not have install date restrictions.
NetInstances
Maximun number of instances running inside a network.
If this field is zero, the license will not have restriction inside a network.
EmbedLicenseInfoInKey
This field is only used by Dynamic SmartActivate keys. When this field is set to 1, the generated SmartActivate key will contain the user information embedded inside the SmartActivate serial number.
If this field is 0, the user information will not be embedded inside the SmartActivate serial number.
EmbedCreationDate
This field specifies if the license creation date will be embedded inside the license. The creation date of the license can be obtained in runtime via the function WLRegLicenseCreationDate.
If this field is 1, the creation date will be inserted inside the generated license.
If this field is 0, the creation date is not inserted inside the license. In that case, WLRegLicenseCreationDate will return false.