0 out of 1 rated this helpful - Rate this topic

LookupPrivilegeDisplayName function

Applies to: desktop apps only

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

Minimum supported server

Windows Server 2003

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

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ