<< Click to Display Table of Contents >>

Navigation:  WinLicense > WinLicense SDK > Registration Functions >


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





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



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



[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.



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



Return Values


The possible return values are:



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


The entered activation key is not found in the database


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.


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)


The device to deactivate is not found in the database.


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


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


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"


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)


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)


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