Skip to content

Latest commit

 

History

History
71 lines (49 loc) · 1.87 KB

LookupPrivilegeDisplayName.md

File metadata and controls

71 lines (49 loc) · 1.87 KB

Home

Function name : LookupPrivilegeDisplayName

Group: Authorization - Library: advapi32


Retrieves the display name that represents a specified privilege.


Code examples:

Reading and setting system access privileges for the current process

Declaration:

BOOL WINAPI LookupPrivilegeDisplayName(
  __in_opt   LPCTSTR lpSystemName,
  __in       LPCTSTR lpName,
  __out_opt  LPTSTR lpDisplayName,
  __inout    LPDWORD cchDisplayName,
  __out      LPDWORD lpLanguageId
);  

FoxPro declaration:

DECLARE INTEGER LookupPrivilegeDisplayName IN advapi32;
	INTEGER lpSystemName,;
	STRING lpName,;
	STRING @lpDisplayName,;
	LONG @cchDisplayName,;
	LONG @lpLanguageId  

Parameters:

lpSystemName [in, optional] A pointer to a null-terminated string that specifies the name of the system on which the privilege name is retrieved.

lpName [in] A pointer to a null-terminated string that specifies the name of the privilege, as defined in Winnt.h.

lpDisplayName [out, optional] A pointer to a buffer that receives a null-terminated string that specifies the privilege display name.

cchDisplayName [in, out] A pointer to a variable that specifies the size, in TCHARs, of the lpDisplayName buffer.

lpLanguageId [out] A pointer to a variable that receives the language identifier for the returned display name.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

Default privileges for VFP9 process on Vista:

See also: LookupPrivilegeName, LookupPrivilegeValue.