Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Registers the product key with SL.
Syntax
HRESULT SLInstallProofOfPurchase(
[in] HSLC hSLC,
[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] pwszPKeyAlgorithm
Type: PCWSTR
The product key algorithm.
[in] pwszPKeyString
Type: PCWSTR
The product key string.
[in] cbPKeySpecificData
Type: UINT
The size, in bytes, of product key specific data. If there is no PKey specific data, set cbPKeySpecificData to 0.
[in, optional] pbPKeySpecificData
Type: PBYTE
A pointer to the product key specific data. If there is no PKey specific data, set pbPKeySpecificData to NULL.
[out] pPkeyId
Type: SLID*
A pointer to an identifier of the registered product key. This SLID can be used to reference PKey information later.
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. |
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 |