AdvApi32LookupPrivilegeName Method
Retrieves the name that corresponds to the privilege represented on a specific system
by a specified locally unique identifier (LUID).
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 LookupPrivilegeName(
string systemName,
ref Luid refLuid,
StringBuilder name,
ref int refCchName
)
<DllImportAttribute("AdvApi32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function LookupPrivilegeName (
systemName As String,
ByRef refLuid As Luid,
name As StringBuilder,
ByRef refCchName As Integer
) As Boolean
Dim systemName As String
Dim refLuid As Luid
Dim name As StringBuilder
Dim refCchName As Integer
Dim returnValue As Boolean
returnValue = AdvApi32.LookupPrivilegeName(systemName,
refLuid, name, refCchName)
public:
[DllImportAttribute(L"AdvApi32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static bool LookupPrivilegeName(
String^ systemName,
Luid% refLuid,
StringBuilder^ name,
int% refCchName
)
[<DllImportAttribute("AdvApi32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member LookupPrivilegeName :
systemName : string *
refLuid : Luid byref *
name : StringBuilder *
refCchName : int 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 empty string is specified, the function attempts to find the privilege name on the local system.
- refLuid Luid
-
A pointer to the Luid structure by which the privilege is known on the target system.
- name StringBuilder
-
A pointer to a buffer that receives a null-terminated string that represents the privilege name.
For example, this string could be "SeSecurityPrivilege".
- refCchName Int32
-
A pointer to a variable that specifies the size, in a TCHAR value, of the lpName buffer.
When the function returns, this parameter contains the length of the privilege name,
not including the terminating null character.
If the buffer pointed to by the name parameter is too small,
this variable contains the required size.
Boolean
If the function succeeds, the return value is a
.
If the function succeeds, the return value is a
.
To get extended error information, call
GetLastWin32Error.