SLGetApplicationPolicy function (slpublic.h)
Queries a policy from the set stored with the SLPersistApplicationPolicies function
and loaded using the SLLoadApplicationPolicies function.
Syntax
HRESULT SLGetApplicationPolicy(
[in] HSLP hPolicyContext,
[in] PCWSTR pwszValueName,
[out, optional] SLDATATYPE *peDataType,
[out] UINT *pcbValue,
[out] PBYTE *ppbValue
);
Parameters
[in] hPolicyContext
Type: HSLP
The context handle returned by the SLLoadApplicationPolicies function.
[in] pwszValueName
Type: PCWSTR
The name of the policy to query, or "*" for all policies.
[out, optional] peDataType
Type: SLDATATYPE*
A pointer to the type of the data, if available.
[out] pcbValue
Type: UINT*
A pointer to the size, in bytes, of the data, if available.
[out] ppbValue
Type: PBYTE*
The data, if available.
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 policy context was not found. |
|
The policy is not found. |
|
The policy list is empty. |
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 |