IAccessControl::GrantAccessRights method
Merges the new list of access rights with the existing access rights on the object.
Syntax
HRESULT GrantAccessRights(
[in] PACTRL_ACCESSW pAccessList
);
Parameters
- pAccessList [in]
-
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:
- [New Access Denied]
- [Old Access Denied]
- [New Access Allowed]
- [Old Access Allowed]
The system-supplied implementation of GrantAccessRights (CLSID_DCOMAccessControl) requires that the cEntries member of the ACTRL_ACCESSW 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
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IAccessControl is defined as EEDD23E0-8410-11CE-A1C3-08002B2B8D8F |
See also