<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Generators Functions > WLGenLicenseTextKeyEx |
The WLGenLicenseTextKeyEx 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.
int WLGenLicenseTextKeyEx( char* pLicenseHash, char* pUserName, char* pOrganization, char* pCustomData, char* pMachineID, sLicenseFeatures* pLicenseFeatures, char* pBufferOut );
int WLGenLicenseTextKeyExW( wchar_t* pLicenseHash, wchar_t* pUserName, wchar_t* pOrganization, wchar_t* pCustomData, wchar_t* pMachineID, sLicenseFeatures* pLicenseFeatures, wchar_t* pBufferOut ); |
function WLGenLicenseTextKeyEx( pLicenseHash:PAnsiChar; pUserName:PAnsiChar; pOrganization:PAnsiChar; pCustomData:PAnsiChar; pMachineID:PAnsiChar; var pLicenseFeatures: sLicenseFeatures; pBufferOut:PAnsiChar ):Integer; stdcall;
function WLGenLicenseTextKeyExW( pLicenseHash:PWideChar; pUserName:PWideChar; pOrganization:PWideChar; pCustomData:PWideChar; pMachineID:PWideChar; var pLicenseFeatures: sLicenseFeatures; pBufferOut:PWideChar ):Integer; stdcall; |
Public Declare Function WLGenLicenseTextKeyEx Lib "WinLicenseSDK.dll" ( ByVal pLicenseHash As String, ByVal pUserName As String, ByVal pOrganization As String, ByVal pCustomData As String, ByVal pMachineID As String, pLicenseFeatures As Any, ByVal pBufferOut As String ) As Integer
Public Declare Function WLGenLicenseTextKeyExW Lib "WinLicenseSDK.dll" ( ByVal pLicenseHash As String, ByVal pUserName As String, ByVal pOrganization As String, ByVal pCustomData As String, ByVal pMachineID As String, pLicenseFeatures As Any, ByVal pBufferOut As String ) As Integer |
class WinlicenseSDK { [DllImport( "WinlicenseSDK.dll", EntryPoint="WLGenLicenseTextKeyEx", CallingConvention = CallingConvention.StdCall )]
public static extern int WLGenLicenseTextKeyEx( string pLicenseHash, string pUserName, string pOrganization, string pCustomData, string pMachineID, sLicenseFeatures pLicenseFeatures, StringBuilder pBufferOut); }
class WinlicenseSDK { [DllImport( "WinlicenseSDK.dll", CharSet = CharSet.Unicode, EntryPoint="WLGenLicenseTextKeyExW", CallingConvention = CallingConvention.StdCall )]
public static extern int WLGenLicenseTextKeyExW( string pLicenseHash, string pUserName, string pOrganization, string pCustomData, string pMachineID, sLicenseFeatures pLicenseFeatures, StringBuilder pBufferOut); } |
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.
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
WLGenLicenseTextKey, WLRegNormalKeyInstallToFile, WLRegNormalKeyInstallToRegistry, WLRegNormalKeyCheck, WLGenLicenseRegistryKey, WLGenLicenseSmartKey, WLGenLicenseFileKey