Export (0) Print
Expand All

SLGetApplicationPolicy function

Queries a policy from the set stored with the SLPersistApplicationPolicies function and loaded using the SLLoadApplicationPolicies function.

Syntax


HRESULT WINAPI SLGetApplicationPolicy(
  _In_       HSLP hPolicyContext,
  _In_       PCWSTR pwszValueName,
  _Out_opt_  SLDATATYPE *peDataType,
  _Out_      UINT *pcbValue,
  _Out_      PBYTE *ppbValue
);

Parameters

hPolicyContext [in]

Type: HSLP

The context handle returned by the SLLoadApplicationPolicies function.

pwszValueName [in]

Type: PCWSTR

The name of the policy to query, or "*" for all policies.

peDataType [out, optional]

Type: SLDATATYPE*

A pointer to the type of the data, if available.

pcbValue [out]

Type: UINT*

A pointer to the size, in bytes, of the data, if available.

ppbValue [out]

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/valueDescription
E_INVALIDARG
0x80070057

One or more arguments are not valid.

SL_E_APPLICATION_POLICIES_NOT_LOADED
0xC004F073

The policy context was not found.

SL_E_VALUE_NOT_FOUND
0xC004F012

The policy is not found.

SL_E_RIGHT_NOT_GRANTED
0xC004F013

The policy list is empty.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Slpublic.h

Library

Slc.lib

DLL

Slc.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft