DeleteAce function

The DeleteAce function deletes an access control entry (ACE) from an access control list (ACL).

Syntax

BOOL DeleteAce(
  PACL  pAcl,
  DWORD dwAceIndex
);

Parameters

pAcl

A pointer to an ACL. The ACE specified by the dwAceIndex parameter is removed from this ACL.

dwAceIndex

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

Return Value

If the function succeeds, the function returns nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

An application can use the ACL_SIZE_INFORMATION structure retrieved by the GetAclInformation function to discover the size of the ACL and the number of ACEs it contains. The GetAce function retrieves information about an individual ACE.

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

ACL_SIZE_INFORMATION

AddAccessAllowedAce

AddAccessDeniedAce

AddAce

AddAuditAccessAce

GetAce

GetAclInformation

Low-level Access Control

Low-level Access Control Functions