LookupPrivilegeName

  BOOL LookupPrivilegeName(lpszSystemName, pluid, lpszName, lpcchName)    
  LPTSTR lpszSystemName;    
  PLUID pluid;    
  LPTSTR lpszName;    
  LPDWORD lpcchName;    

The LookupPrivilegeName function returns the programmatic name corresponding to the privilege represented on the target system by the provided LUID.

Parameters

lpszSystemName

Supplies the name of the system at which the lookup is to be performed. If the null string is provided, the local system is assumed.

pluid

Is the locally unique ID the privilege is known by on the target machine.

lpszName

Receives the privilege's programmatic name.

lpcchName

Specifies how large the buffer is (in characters). When the function returns, this parameter contains the length of the returned name, not including the null-terminator.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.

See Also

LookupPrivilegeDisplayName