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.

ValueDescription
REG_DWORDA 32-bit integer. For this type, the size of the buffer that the dataBuffer parameter specifies should be at least 4 bytes.
REG_BINARYA binary value.
REG_SZA 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.

ValueMeaning
E_INVALIDARG
0x80070057

One or more arguments are not valid.

SL_E_VALUE_NOT_FOUND
0xC004F012

The specified name-value pair was not found.

 

Component policies

Policy nameWindows 10 Pro EducationWindows 10 EducationAll other Windows editions
{6296CE48-18F7-47B6-848A-7E8E56FADD6F}
Data type
REG_DWORD
110

 

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

Slpublic.h

Library

Api-ms-win-core-slapi-l1-1-0.lib

DLL

Api-ms-win-core-slapi-l1-1-0.dll

 

 

Show: