SaferGetLevelInformation function (winsafer.h)

The SaferGetLevelInformation function retrieves information about a policy level.

Syntax

BOOL SaferGetLevelInformation(
  [in]            SAFER_LEVEL_HANDLE      LevelHandle,
  [in]            SAFER_OBJECT_INFO_CLASS dwInfoType,
  [out, optional] LPVOID                  lpQueryBuffer,
  [in]            DWORD                   dwInBufferSize,
  [out]           LPDWORD                 lpdwOutBufferSize
);

Parameters

[in] LevelHandle

The handle of the level to be queried.

[in] dwInfoType

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

Value Meaning
SaferObjectLevelId
1
Queries for the LEVELID constant.

lpQueryBuffer return type: DWORD.

SaferObjectScopeId
2
Queries for the user or machine scope.

lpQueryBuffer return type: DWORD.

SaferObjectFriendlyName
3
Queries for the display name.

lpQueryBuffer return type: LPCWSTR.

SaferObjectDescription
4
Queries for the description.

lpQueryBuffer return type: LPCWSTR.

[out, optional] lpQueryBuffer

A buffer to contain the results of the query. For the type of the returned information for each possible value of the dwInfoType parameter, see the dwInfoType parameter.

[in] dwInBufferSize

The size of the lpQueryBuffer parameter in bytes.

[out] lpdwOutBufferSize

A pointer to return the output size of the lpQueryBuffer parameter.

Return value

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

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header winsafer.h
Library Advapi32.lib
DLL Advapi32.dll
API set ext-ms-win-advapi32-safer-l1-1-0 (introduced in Windows 8)