AdvApi32LookupPrivilegeDisplayName Method

Retrieves the display name that represents a specified privilege.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("AdvApi32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static bool LookupPrivilegeDisplayName(
	string systemName,
	string name,
	StringBuilder displayName,
	ref uint refDisplayNameSize,
	out uint refLanguageId
)

Parameters

systemName  String
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.

name  String
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, RemoteShutdownPrivilege, or its corresponding string, "SeRemoteShutdownPrivilege".

displayName  StringBuilder
A pointer to a buffer that receives a null-terminated string that specifies the privilege display name.

For example, if the name parameter is RemoteShutdownPrivilege, the privilege display name is "Force shutdown from a remote system.".

refDisplayNameSize  UInt32
A pointer to a variable that specifies the size, in characters, of the displayName 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 displayName parameter is too small, this variable contains the required size.

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

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also