LookupPrivilegeDisplayName
The LookupPrivilegeDisplayName function retrieves a displayable name representing a specified privilege.
BOOL LookupPrivilegeDisplayName(
LPCTSTR lpSystemName, // system name
LPCTSTR lpName, // privilege name
LPTSTR lpDisplayName, // displayable name
LPDWORD cbDisplayName, // size of displayable name
LPDWORD lpLanguageId // language identifier
);
Parameters
- lpSystemName
- [in] Pointer to a null-terminated string specifying the name of the system on which the displayable privilege name is looked up. If a null string is specified, the function attempts to find the displayable name on the local system.
- lpName
- [in] Pointer to a null-terminated string that specifies the name of the privilege, as defined in the WINNT.H header file. For example, this parameter could specify the constant SE_REMOTE_SHUTDOWN_NAME, or its corresponding string, "SeRemoteShutdownPrivilege".
- lpDisplayName
- [out] Pointer to a buffer receiving a null-terminated string giving the privilege's displayable name. For example, if the lpName parameter is SE_REMOTE_SHUTDOWN_NAME, the displayable name is "Force shutdown from a remote system."
- cbDisplayName
- [in/out] Pointer to a variable specifying the size, in characters, of the lpDisplayName buffer. When the function returns, this parameter contains the length of the displayable privilege 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 when the function returns.
- lpLanguageId
- [out] Pointer to a variable receiving the language identifier for the returned displayable name.
Return Values
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.
Windows NT/2000: Requires Windows NT 3.1 or later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Advapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
See Also
Access Control Overview, Access Control Functions, LookupPrivilegeName, LookupPrivilegeValue