SLInstallProofOfPurchaseEx function (slpublic.h)
Register the product key with SL.
Syntax
HRESULT SLInstallProofOfPurchaseEx(
[in] HSLC hSLC,
[in] const SLID *pApplicationId,
[in, optional] const SLID *pProductSkuId,
[in] PCWSTR pwszPKeyAlgorithm,
[in] PCWSTR pwszPKeyString,
[in] UINT cbPKeySpecificData,
[in, optional] PBYTE pbPKeySpecificData,
[out] SLID *pPkeyId
);
Parameters
[in] hSLC
Type: HSLC
The handle to the current SLC context.
[in] pApplicationId
Type: const SLID*
A pointer to the application ID.
[in, optional] pProductSkuId
Type: const SLID*
A pointer to the product SKU ID.
[in] pwszPKeyAlgorithm
Type: PCWSTR
The product key algorithm.
[in] pwszPKeyString
Type: PCWSTR
The product key string.
[in] cbPKeySpecificData
Type: UINT
The size, in bytes, of the product key specific data. If no PKey specific data exists, set cbPKeySpecificData to 0.
[in, optional] pbPKeySpecificData
Type: PBYTE
A pointer to product key specific data. If no PKey specific data exists, set pbPKeySpecificData to NULL.
[out] pPkeyId
Type: SLID*
A pointer to the identifier of the registered product key. Used to reference PKey information.
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. |
|
Access denied (API requires admin privileges). |
|
The action requires administrator privilege. |
|
The product key is not valid. |
|
The license is not installed. |
|
This specified product key can only be used for upgrading, not for clean installations. |
|
The product SKU is not found. |
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 |