SLActivateProduct function (slpublic.h)

Acquires a use license from the Software License Server (SLS).

Syntax

HRESULT SLActivateProduct(
  [in]           HSLC                            hSLC,
  [in]           const SLID                      *pProductSkuId,
  [in, optional] UINT                            cbAppSpecificData,
  [in, optional] const PVOID                     pvAppSpecificData,
  [in, optional] const SL_ACTIVATION_INFO_HEADER *pActivationInfo,
  [in, optional] PCWSTR                          pwszProxyServer,
  [in, optional] WORD                            wProxyPort
);

Parameters

[in] hSLC

Type: HSLC

The handle to the current SLC context.

[in] pProductSkuId

Type: const SLID*

A pointer to the product ID.

[in, optional] cbAppSpecificData

Type: UINT

The size of application specific data.

[in, optional] pvAppSpecificData

Type: const PVOID

A pointer to application specific data. The license server can use this
information to embed application specific run-time information.

[in, optional] pActivationInfo

Type: const SL_ACTIVATION_INFO_HEADER*

A pointer to additional product activation information.

[in, optional] pwszProxyServer

Type: PCWSTR

The proxy server name. Set this to NULL to use automatic proxy discovery.

[in, optional] wProxyPort

Type: WORD

The proxy server port. To use the default port, set wProxyPort to 0.

Return value

Type: HRESULT WINAPI

If this function succeeds, it return S_OK. Otherwise, it returns an HRESULT error code.

Return code/value Description
E_INVALIDARG
0x80070057
One or more arguments are not valid.
SL_E_PUBLISHING_LICENSE_NOT_INSTALLED
0xC004F017
The license is not installed.
SL_E_PKEY_NOT_INSTALLED
0xC004F014
The product key is not available.
SL_E_PRODUCT_SKU_NOT_INSTALLED
0xc004f015
The license is not installed.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header slpublic.h
Library Slc.lib
DLL Slc.dll