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 |
---|---|
|
One or more arguments are not valid. |
|
The license is not installed. |
|
The product key is not available. |
|
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 |