Reference

LookupPrivilegeNameW(3w)

NAME

LookupPrivilegeNameW (ADVAPI32.@)

SYNOPSIS

BOOL LookupPrivilegeNameW
(
LPCWSTR lpSystemName,
PLUID lpLuid,
LPWSTR lpName,
LPDWORD cchName
)

DESCRIPTION

Retrieves the privilege name referred to by the LUID lpLuid.

PARAMS

lpSystemName [In] Name of the system.

lpLuid [In] Privilege value.

lpName [Out] Name of the privilege.

cchName [In/Out] Number of characters in lpName.

RETURNS

Success: TRUE. lpName contains the name of the privilege whose value is *lpLuid.

Failure: FALSE.

REMARKS

Only well-known privilege names (those defined in winnt.h) can be retrieved using this function. If the length of lpName is too small, on return *cchName will contain the number of WCHARs needed to contain the privilege, including the NULL terminator, and GetLastError will return ERROR_INSUFFICIENT_BUFFER. On success, *cchName will contain the number of characters stored in lpName, NOT including the NULL terminator.

IMPLEMENTATION

Declared in "winbase.h".

Implemented in "dlls/advapi32/security.c".

Debug channel "advapi".

History