Export (0) Print
Expand All

SaferGetPolicyInformation function

The SaferGetPolicyInformation function gets information about a policy. You can query to find out more information about the policy.

Syntax


BOOL WINAPI SaferGetPolicyInformation(
  _In_        DWORD dwScopeId,
  _In_        SAFER_POLICY_INFO_CLASS SaferPolicyInfoClass,
  _In_        DWORD InfoBufferSize,
  _Out_       PVOID InfoBuffer,
  _Out_       PDWORD InfoBufferRetSize,
  _Reserved_  LPVOID lpReserved
);

Parameters

dwScopeId [in]

The scope of the query. The following table shows the possible values.

ValueMeaning
SAFER_SCOPEID_MACHINE
1

The scope of the query is by computer.

SAFER_SCOPEID_USER
2

The scope of the query is by user.

 

SaferPolicyInfoClass [in]

A SAFER_POLICY_INFO_CLASS enumeration value that specifies the type of policy information that should be returned. The specified value determines the size and type of the InfoBuffer parameter. The following table shows the possible values.

ValueMeaning
SaferPolicyLevelList
1

Queries for the list of all levels defined in a policy.

InfoBuffer return type: DWORD array of LevelIds.

SaferPolicyEnableTransparentEnforcement
2

Queries for the policy value to determine whether DLL checking is enabled.

InfoBuffer return type: DWORD Boolean.

SaferPolicyDefaultLevel
3

Queries for the default policy level.

InfoBuffer return type: DWORD LevelId.

SaferPolicyEvaluateUserScope
4

Queries to determine whether user scope rules should be consulted during policy evaluation.

InfoBuffer return type: DWORD.

SaferPolicyScopeFlags
5

Queries to determine whether the policy is to skip members of the local administrators group.

InfoBuffer return type: DWORD.

 

InfoBufferSize [in]

The size, in bytes, of the InfoBuffer parameter.

InfoBuffer [out]

A buffer to contain the results of the query. The size and type of the returned information is determined by the SaferPolicyInfoClass parameter. For the type of the returned information for each possible value of the SaferPolicyInfoClass parameter, see the SaferPolicyInfoClass parameter.

InfoBufferRetSize [out]

The number of bytes in the InfoBuffer parameter that were filled with policy information.

lpReserved

Reserved for future use. This parameter should be set to NULL.

Return value

TRUE if the function succeeds; otherwise, FALSE. For extended error information, call GetLastError.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinSafer.h

Library

Advapi32.lib

DLL

Advapi32.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft