SLQueryLicenseValueFromApp function
[This API is not available to all Windows/Windows Phone apps. Unless your developer account is specially provisioned by Microsoft, calls to these APIs will fail at runtime.]
Gets the value for the specified component policy.
Syntax
HRESULT STDAPICALLTYPE SLQueryLicenseValueFromApp( _In_ PCWSTR valueName, _Out_opt_ ULONG *valueType, _Out_opt_ PVOID dataBuffer, _In_ ULONG dataSize, _Out_ ULONG *resultDataSize );
Parameters
- valueName [in]
-
The name of the policy for which you want to get information.
- valueType [out, optional]
-
The data type of the policy value. The following table describes the values that this parameter can receive.
Value Description REG_DWORD A 32-bit integer. For this type, the size of the buffer that the dataBuffer parameter specifies should be at least 4 bytes. REG_BINARY A binary value. REG_SZ A wide-character, null-terminated string, including the last null character. - dataBuffer [out, optional]
-
A buffer that receives the value of the component policy.
- dataSize [in]
-
The size of the supplied buffer, in bytes.
- resultDataSize [out]
-
The actual size of the data received for the policy value, in bytes.
Return value
If this function succeeds, it return S_OK. Otherwise, it returns an HRESULT error code.
| Value | Meaning |
|---|---|
|
One or more arguments are not valid. |
|
The specified name-value pair was not found. |
Component policies
| Policy name | Windows 10 Pro Education | Windows 10 Education | All other Windows editions |
|---|---|---|---|
{6296CE48-18F7-47B6-848A-7E8E56FADD6F}
| 1 | 1 | 0 |
Remarks
Your app must have the restricted slapiQueryLicenseValue capability to call the SLQueryLicenseValueFromApp function.
Requirements
|
Minimum supported client |
Windows 10 [desktop apps | UWP apps] |
|---|---|
|
Minimum supported server |
Windows Server 2016 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|