GetExplicitEntriesFromAclA function

The GetExplicitEntriesFromAcl function retrieves an array of structures that describe the access control entries (ACEs) in an access control list (ACL).

Syntax

DWORD GetExplicitEntriesFromAclA(
  PACL               pacl,
  PULONG             pcCountOfExplicitEntries,
  PEXPLICIT_ACCESS_A *pListOfExplicitEntries
);

Parameters

pacl

A pointer to an ACL structure from which to get ACE information.

pcCountOfExplicitEntries

A pointer to a variable that receives the number of EXPLICIT_ACCESS structures returned in the pListOfExplicitEntries array.

pListOfExplicitEntries

A pointer to a variable that receives a pointer to an array of EXPLICIT_ACCESS structures that describe the ACEs in the ACL. If the function succeeds, you must call the LocalFree function to free the returned buffer.

Return Value

If the function succeeds, the function returns ERROR_SUCCESS.

If the function fails, it returns a nonzero error code defined in WinError.h.

Remarks

Each entry in the array of EXPLICIT_ACCESS structures describes access control information from an ACE for a trustee. A trustee can be a user, group, or program (such as a Windows service).

Each EXPLICIT_ACCESS structure specifies a set of access rights and an access mode flag that indicates whether the ACE allows, denies, or audits the specified rights.

For a discretionary access control list (DACL), the access mode flag can be either GRANT_ACCESS or DENY_ACCESS. For information about these values, see ACCESS_MODE.

For a system access control list (SACL), the access mode flag can be SET_AUDIT_ACCESS, SET_AUDIT_FAILURE, or both. For information about these values, see ACCESS_MODE.

Requirements

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

See Also

ACCESS_ALLOWED_ACE

ACCESS_DENIED_ACE

ACCESS_MODE

ACE

ACL

Access Control

Basic Access Control Functions

EXPLICIT_ACCESS

LocalFree

SYSTEM_AUDIT_ACE