SLActivateProduct function

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

Syntax

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

Parameters

hSLC

Type: HSLC

The handle to the current SLC context.

pProductSkuId

Type: const SLID*

A pointer to the product ID.

cbAppSpecificData

Type: UINT

The size of application specific data.

pvAppSpecificData

Type: const PVOID

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

pActivationInfo

Type: const SL_ACTIVATION_INFO_HEADER*

A pointer to additional product activation information.

pwszProxyServer

Type: PCWSTR

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

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

   
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