Contents - Index


4.2.3.13 Get Reference

HRESULT SLS_GetReference(
                                                LPCSTR pszProductID,
                                                LPSTR pszReference)

The SLS_GetReference queries SLSAPI for the reference code associated with the product.

Parameters

pszProductID

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

pszReference

Points to a buffer in which the Reference Code is to be placed. The minimum size of the buffer is 32 bytes.

Return Values

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

Remarks

The application calls the SLS_GetReference to obtain the reference code of the product installed on the user's PC. With the reference code the user can obtain the licence key from the application publisher. SLS_Reference is often called by the application that wants to programmatically issue a licence policy from the application, in which case SLS_SetLicence is called upon when the application has received the licence key from the publisher.