Prev Next
The LookupPrivilegeDisplayName function retrieves a displayable name
representing a specified privilege.
BOOL LookupPrivilegeDisplayName(
LPCTSTR lpSystemName,
|
// pointer to string specifying the system
|
LPCTSTR lpName,
|
// pointer to string specifying the privilege
|
LPTSTR lpDisplayName,
|
// pointer to string receiving the displayable name
|
LPDWORD cbDisplayName,
|
// pointer to size of string for displayable name
|
LPDWORD lpLanguageId
|
// pointer to language identifier
|
);
|
|
Parameters
-
lpSystemName
-
Points 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
-
Points 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
-
Points 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
-
Points 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
-
Points 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.
See Also
LookupPrivilegeName, LookupPrivilegeValue