WLRegActivateSoftware

<< Click to Display Table of Contents >>

Navigation:  WinLicense > WinLicense SDK > Registration Functions >

WLRegActivateSoftware

The WLRegActivateSoftware function performs activation of your application from a given activation key. Internally, the function calls the activation PHP page in your web server (defined in the Activation panel) and it should receive a license key (locked to the current machine) if the activation key is valid.

Click to expand/collapseShow C/C++ function definition
Click to expand/collapseShow Delphi function definition
Click to expand/collapseShow Visual Basic Native function definition
Click to expand/collapseShow .NET function definition

 

Parameters

 

pActivationKey

[in] Pointer to an ASCII string that will contain the activation key

 

WinsockErrorCode

[out] This parameter contains the Winsock error code in case that you get the "RESPONSE_ERROR_WINSOCK_ERROR" return value

 

ServerResponseString

[out] This parameter contains the buffer returned by your PHP activation page. You might want to display this buffer to the customer so he can send you further information when the activation key is not processed correctly.

 

SizeServerResponseString

[in] This parameter contains the size of the ServerResponseString buffer

 

 

Return Values

 

The possible return values are:

 

RESPONSE_ACTIVATION_OK (0)

The activation key was processed correctly and a license has been retrieved from the server to register your application

RESPONSE_ERROR_KEY_NOT_FOUND (1)

The entered activation key is not found in the database

RESPONSE_ERROR_MAX_SIMULTANEOUS_ACTIVATIONS_REACHED (2)

The activation key is currently activating the maximum number of simultaneous devices. The maximum number of simultaneous devices is specified by the "Simultaneous Devices" option in "WL Orders Manager" (in the "Manage Activations" panel). If the customer wants to activate a new device, he first needs to deactivate one active device.

RESPONSE_ERROR_NO_MORE_ACTIVATIONS_ALLOWED (3)

The maximum number of activation for the current Activation key has been reached. You can control the maximum number of activations from the "Activations Limit" option in "WL Orders Manager" (in the "Manage Activations" panel)

RESPONSE_ERROR_DEVICE_NOT_FOUND (5)

The device to deactivate is not found in the database.

RESPONSE_ERROR_WRONG_DATA_RECEIVED (6)

The activation key is processed correctly but the license data is not retrieved correctly (the license generator application is not generating an expected output)

RESPONSE_ERROR_KEY_DISABLED_BY_SELLER (7)

The activation key has been manually marked as "Disabled" in "WL Orders Manager" (in "Manage Activations" panel)

RESPONSE_ERROR_KEY_EXPIRED  (8)

The expiration date (to allow activation) is already reached. This expiration date was inserted when the activation key was created in "WL Orders Manager". You can manually extend this date if required from the "Manage Activations" panel in "WL Orders Manager"

RESPONSE_ERROR_NO_MORE_DIFFERENT_DEVICES_ALLOWED  (9)

The activation code has been already activated in more different PCs that were allowed. You can control the maximum number of different devices from the "Max. Different Devices" option in "WL Orders Manager" (in the "Manage Activations" panel)

RESPONSE_ERROR_CANNOT_INSTALL_LICENSE (50)

The activation key was processed correctly and the server sent back a correct license key, but it was not possible to write it to the expected location in the customer's PC. This happens if your application does not have rights to write to the expected location for your licenses (you can set the location of your license in the "Registration" panel)

RESPONSE_ERROR_WINSOCK_ERROR (100)

This error appears when there are problems to access to the internet or your web server from your application. To know the exact Winsock error code you can read the "WinsockErrorCode" parameter

 

 

See Also

 

WLRegDeactivateSoftware