DeleteAce

  BOOL DeleteAce(Acl, AceIndex)    
  PACL Acl;    
  DWORD AceIndex;    

The DeleteAce function deletes an ACE from an existing ACL. An ACE is an access control entry. An ACL is an access control list.

The caller specifies an ACL to modify and an index value that indicates the ACE to delete.

Parameters

Acl

Pointer to an existing ACL data structure. The ACE will be removed from this ACL.

The ACL data structure has the following form:

typedef struct _ACL { /* acl */

BYTE AclRevision;

BYTE Sbz1;

WORD AclSize;

WORD AceCount;

WORD Sbz2;

} ACL;

AceIndex

An zero-based index that specifies the ACE to delete. An ACL maintains a list of ACEs. A value of 0 corresponds to the ACL's first ACE, 1 to its second ACE, and so on.

Return Value

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

See Also

AddAccessAllowedAce, AddAce, GetAce, GetAclInformation, InitializeAcl, IsValidAcl, SetAclInformation