IAccessControl::GrantAccessRights method (iaccess.h)

Merges the new list of access rights with the existing access rights on the object.

Syntax

HRESULT GrantAccessRights(
  [in] PACTRL_ACCESSW pAccessList
);

Parameters

[in] pAccessList

A pointer to the ACTRL_ACCESS structure that contains an array of access lists for the object.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Merging the new access rights list with the existing access rights ensures that the object will have at least the indicated access rights. This merge process consists of adding the new denied access rights before the old denied access rights, and the new allowed access rights before the existing allowed rights. None of the existing rights are removed.

Following a merge, the access rights on an object are ordered as follows:

  1. [New Access Denied]
  2. [Old Access Denied]
  3. [New Access Allowed]
  4. [Old Access Allowed]
The system-supplied implementation of [ACTRL_ACCESS](../accctrl/ns-accctrl-explicit_access_a.md) structure be set to 1. In addition, the lpProperty member of the ACTRL_PROPERTY_ENTRYW structure must be NULL to indicate that the access entry list applies to the object itself.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header iaccess.h

See also

IAccessControl