Expand Minimize

LookupPrivilegeDisplayName function

The LookupPrivilegeDisplayName function retrieves the display name that represents a specified privilege.

Syntax


BOOL WINAPI LookupPrivilegeDisplayName(
  _In_opt_   LPCTSTR lpSystemName,
  _In_       LPCTSTR lpName,
  _Out_opt_  LPTSTR lpDisplayName,
  _Inout_    LPDWORD cchDisplayName,
  _Out_      LPDWORD lpLanguageId
);

Parameters

lpSystemName [in, optional]

A pointer to a null-terminated string that specifies the name of the system on which the privilege name is retrieved. If a null string is specified, the function attempts to find the display name on the local system.

lpName [in]

A pointer to a null-terminated string that specifies the name of the privilege, as defined in Winnt.h. For example, this parameter could specify the constant, SE_REMOTE_SHUTDOWN_NAME, or its corresponding string, "SeRemoteShutdownPrivilege". For a list of values, see Privilege Constants.

lpDisplayName [out, optional]

A pointer to a buffer that receives a null-terminated string that specifies the privilege display name. For example, if the lpName parameter is SE_REMOTE_SHUTDOWN_NAME, the privilege display name is "Force shutdown from a remote system."

cchDisplayName [in, out]

A pointer to a variable that specifies the size, in TCHARs, of the lpDisplayName buffer. When the function returns, this parameter contains the length of the privilege display name, not including the terminating null character. If the buffer pointed to by the lpDisplayName parameter is too small, this variable contains the required size.

lpLanguageId [out]

A pointer to a variable that receives the language identifier for the returned display name.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The LookupPrivilegeDisplayName function retrieves display names only for the privileges specified in the Defined Privileges section of Winnt.h.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

Unicode and ANSI names

LookupPrivilegeDisplayNameW (Unicode) and LookupPrivilegeDisplayNameA (ANSI)

See also

Access Control Overview
Basic Access Control Functions
LookupPrivilegeName
LookupPrivilegeValue

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.