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.
Gets the registered product key ID associated with the product.
Syntax
HRESULT SLGetPKeyId(
[in] HSLC hSLC,
[in] PCWSTR pwszPKeyAlgorithm,
[in] PCWSTR pwszPKeyString,
[in] UINT cbPKeySpecificData,
[in] const BYTE *pbPKeySpecificData,
[out] SLID *pPKeyId
);
Parameters
[in] hSLC
The handle to the current SLC context.
[in] pwszPKeyAlgorithm
The product key algorithm.
[in] pwszPKeyString
The product key string.
[in] cbPKeySpecificData
The size, in bytes, of the product key specific data. If there is no PKey specific data, set cbPKeySpecificData to 0.
[in] pbPKeySpecificData
A pointer to the product key specific data. If there is no PKey specific data, set pbPKeySpecificData to NULL.
[out] pPKeyId
A pointer to the product key ID.
Return value
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 product key is not available. |
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 |