RtlDeleteAce function (ntifs.h)

The RtlDeleteAce routine deletes an access control entry (ACE) from a specified access control list (ACL).

Syntax

NTSYSAPI NTSTATUS RtlDeleteAce(
  [in, out] PACL  Acl,
  [in]      ULONG AceIndex
);

Parameters

[in, out] Acl

Pointer to the ACL to be modified. RtlDeleteAce deletes the specified ACE from this ACL.

[in] AceIndex

Specifies the ACE to delete. A value of zero corresponds to the first ACE in the ACL, 1 to the second ACE, and so on.

Return value

RtlDeleteAce returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:

Return code Description
STATUS_INVALID_PARAMETER One of the parameter values was invalid.

Possible reasons for STATUS_INVALID_PARAMETER include:

  • The specified ACL is invalid.
  • The specified index value is out of range.
  • STATUS_INVALID_PARAMETER is an error code.

Remarks

For information about calculating the size of an ACL, see the Remarks section of the reference entry for RtlCreateAcl.

To add an ACE to an ACL, use RtlAddAce.

To obtain a pointer to an ACE in an ACL, use RtlGetAce.

For more information about security and access control, see Windows security model for driver developers and the documentation on these topics in the Windows SDK.

Requirements

Requirement Value
Minimum supported client Windows Server 2003 SP1
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= APC_LEVEL

See also

ACE

ACL

RtlAddAce

RtlCreateAcl

RtlGetAce