AdvApi32LookupPrivilegeDisplayName Method
Retrieves the display name that represents a specified privilege.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("AdvApi32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function LookupPrivilegeDisplayName (
systemName As String,
name As String,
displayName As StringBuilder,
ByRef refDisplayNameSize As UInteger,
<OutAttribute> ByRef refLanguageId As UInteger
) As Boolean
Dim systemName As String
Dim name As String
Dim displayName As StringBuilder
Dim refDisplayNameSize As UInteger
Dim refLanguageId As UInteger
Dim returnValue As Boolean
returnValue = AdvApi32.LookupPrivilegeDisplayName(systemName,
name, displayName, refDisplayNameSize,
refLanguageId)
public:
[DllImportAttribute(L"AdvApi32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool LookupPrivilegeDisplayName(
String^ systemName,
String^ name,
StringBuilder^ displayName,
unsigned int% refDisplayNameSize,
[OutAttribute] unsigned int% refLanguageId
)
[<DllImportAttribute("AdvApi32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member LookupPrivilegeDisplayName :
systemName : string *
name : string *
displayName : StringBuilder *
refDisplayNameSize : uint32 byref *
refLanguageId : uint32 byref -> bool
No code example is currently available or this language may not be supported.
- 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.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.