AdvApi32LookupPrivilegeName Method

Retrieves the name that corresponds to the privilege represented on a specific system by a specified locally unique identifier (LUID).

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 LookupPrivilegeName(
	string systemName,
	ref Luid refLuid,
	StringBuilder name,
	ref int refCchName
)

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

Return Value

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.

Remarks

See Also