SaferSetLevelInformation function

The SaferSetLevelInformation function sets the information about a policy level.

Syntax


BOOL WINAPI SaferSetLevelInformation(
  _In_ SAFER_LEVEL_HANDLE      LevelHandle,
  _In_ SAFER_OBJECT_INFO_CLASS dwInfoType,
  _In_ LPVOID                  lpQueryBuffer,
  _In_ DWORD                   dwInBufferSize
);

Parameters

LevelHandle [in]

The handle of the level to be set.

dwInfoType [in]

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

ValueMeaning
SaferObjectLevelId
1

Sets the LEVELID constant.

lpQueryBuffer return type: DWORD.

SaferObjectScopeId
2

Sets the user or machine scope.

lpQueryBuffer return type: DWORD.

SaferObjectFriendlyName
3

Sets the display name.

lpQueryBuffer return type: LPCWSTR.

SaferObjectDescription
4

Sets the description.

lpQueryBuffer return type: LPCWSTR.

 

lpQueryBuffer [in]

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.

dwInBufferSize [in]

The size, in bytes, of the lpQueryBuffer parameter.

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

 

 

Show: