SLGetPKeyId function
Gets the registered product key ID associated with the product.
Syntax
HRESULT WINAPI SLGetPKeyId(
_In_ HSLC hSLC,
_In_ PCWSTR pwszPKeyAlgorithm,
_In_ PCWSTR pwszPKeyString,
_In_ UINT cbPKeySpecificData,
_In_ const BYTE *pbPKeySpecificData,
_Out_ SLID *pPKeyId
);
Parameters
- hSLC [in]
-
The handle to the current SLC context.
- pwszPKeyAlgorithm [in]
-
The product key algorithm.
- pwszPKeyString [in]
-
The product key string.
- cbPKeySpecificData [in]
-
The size, in bytes, of the product key specific data. If there is no PKey specific data, set cbPKeySpecificData to 0.
- pbPKeySpecificData [in]
-
A pointer to the product key specific data. If there is no PKey specific data, set pbPKeySpecificData to NULL.
- pPKeyId [out]
-
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
|
Minimum supported client | Windows 8 [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 10/26/2012
