WLRegDeactivateSoftware

<< Click to Display Table of Contents >>

Navigation:  WinLicense > WinLicense SDK > Registration Functions >

WLRegDeactivateSoftware

The WLRegDeactivateSoftware function performs deactivation 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 if the activation key is valid, the license will be removed (and invalidated) from the current system.

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_DEACTIVATION_OK (0)

The deactivation process went OK and the current license has been removed from the system and marked as banned. The current PC is marked as revoked in the activation database

RESPONSE_ERROR_KEY_NOT_FOUND (1)

The entered activation key is not found in the database

RESPONSE_ERROR_NO_MORE_DEACTIVATIONS_ALLOWED (4)

The customer has deactivated more devices than allowed. You can control the maximum number of deactivations from the "Deactivation 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_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

 

WLRegActivateSoftware