Contents - Index


4.2.3.29 Remove Licence

HRESULT WINAPI SLS_Remove(
                                                    LPCSTR pszProductID,
                                                    DWORD dwOptions,
                                                    SLS_CHALLENGE *pChallenge)

Parameters

pszProductID

Points to a string that uniquely identifies the application's Product ID.

dwOptions

Instructs how which part of the licence system should be removed. It is a combination of the following values:

#define SLS_REMOVE_FILES 0x0001 //remove licence files

#define SLS_REMOVE_REGISTRY 0x0002 //remove licence registry

#define SLS_REMOVE_HISTORY 0x0004 //remove licence history

#define SLS_REMOVE_ALL 0x0007 //remove all of above

pChallenge

Points to a challenge structure. The licence system does not challenge back.

Return Values

SLS_SUCCESS if the function is successful. Otherwise an error status code is returned to indicate the cause of the error.

Remarks

Unlike SLS_Terminate which is designed to enable end users to terminate the licence, SLS_Remove is designed to enable the software publisher to remove the licence.

In other words, the difference between "Terminate" and "Remove" is that:

  1. SLS_Terminate generates a termination code that the software publisher uses to verify whether the licence has been terminated from the PC, whereas SLS_Remove does not.

  2. SLS_Terminate only removes the licence files, whereas SLS_Remove can completely remove all of the licence components including licence files, registry setting and history marks on the PC.

See also SLS_GenerateRemovePassword in the Extended API.