GetAce function

The GetAce function obtains a pointer to an access control entry (ACE) in an access control list (ACL).

Syntax

BOOL GetAce(
  PACL   pAcl,
  DWORD  dwAceIndex,
  LPVOID *pAce
);

Parameters

pAcl

A pointer to an ACL that contains the ACE to be retrieved.

dwAceIndex

The index of the ACE to be retrieved. A value of zero corresponds to the first ACE in the ACL, a value of one to the second ACE, and so on.

pAce

A pointer to a pointer that the function sets to the address of the ACE.

Return Value

If the function succeeds, the function returns nonzero.

If the function fails, it returns zero. To get extended error information, call GetLastError.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header securitybaseapi.h (include Windows.h)
Library Advapi32.lib
DLL Advapi32.dll

See Also

AddAccessAllowedAce

AddAccessDeniedAce

AddAce

AddAuditAccessAce

GetAclInformation

InitializeAcl

Low-level Access Control

Low-level Access Control Functions