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 information of the specified product key.
Syntax
HRESULT SLGetPKeyInformation(
[in] HSLC hSLC,
[in] const SLID *pPKeyId,
[in] PCWSTR pwszValueName,
[out, optional] SLDATATYPE *peDataType,
[out] UINT *pcbValue,
[out] PBYTE *ppbValue
);
Parameters
[in] hSLC
Type: HSLC
The handle to the current SLC context.
[in] pPKeyId
Type: const SLID*
A pointer to the PKey ID.
[in] pwszValueName
Type: PCWSTR
The name associated with the value to retrieve. The following names are valid.
[out, optional] peDataType
Type: SLDATATYPE*
The data type.
Value | Meaning |
---|---|
|
UNICODE string |
|
DWORD |
|
Binary BLOB |
[out] pcbValue
Type: UINT*
A pointer to the size, in bytes, of the ppbValue buffer.
[out] ppbValue
Type: PBYTE*
A pointer to the data returned by SLC.
When finished using the memory, free it by calling the LocalFree function.
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 product key is not available. |
|
The request is not supported. |
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 |