ISecurityInformation::GetAccessRights
The GetAccessRights method requests information about the access rights that can be controlled for a securable object. The access control editor calls this method to retrieve display strings and other information used to initialize the property pages. For more information, see Access Rights and Access Masks.
HRESULT GetAccessRights(
const GUID *pguidObjectType,
DWORD dwFlags,
PSI_ACCESS *ppAccess,
ULONG *pcAccesses,
ULONG *piDefaultAccess
);
Parameters
- pguidObjectType
- [in] Pointer to a GUID structure that identifies the type of object for which access rights are being requested. If this parameter is NULL or a pointer to GUID_NULL, return the access rights for the object being edited. Otherwise, the GUID identifies a child object type returned by the ISecurityInformation::GetInheritTypes method. The GUID corresponds to the InheritedObjectType member of an object-specific ACE.
- dwFlags
- [in] A set of bit flags that indicate the property page being initialized. This value is zero if the basic security page is being initialized. Otherwise, it is a combination of the following values.
Value |
Meaning |
SI_ADVANCED |
The advanced security property sheet is being initialized. |
SI_EDIT_AUDITS |
The advanced security property sheet includes the Audit property page. |
SI_EDIT_PROPERTIES |
The advanced security property sheet enables editing of ACEs that apply to the object's properties and property sets. |
- ppAccess
- [out] Pointer to a variable that you should set to a pointer to an array of SI_ACCESS structures. The array should include one entry for each access right. You can specify access rights that apply to the object itself, as well as object-specific access rights that apply only to a property set or property on the object.
- pcAccesses
- [out] Pointer to a variable that you should set to indicate the number of entries in the ppAccess array.
- piDefaultAccess
- [out] Pointer to a variable that you should set to indicate the zero-based index of the array entry that contains the default access rights. The access control editor uses this entry as the initial access rights in a new ACE.
Return Values
Return S_OK if successful.
Return a nonzero error code if an error occurs.
Remarks
The GetAccessRights method is called each time a property page is initialized.
The access control editor does not free the pointer returned in *ppAccess.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Aclui.h.
See Also
Access Control Editor Overview, Access Control Editor Interfaces, CreateSecurityPage, EditSecurity, GUID, ISecurityInformation::GetInheritTypes, SI_ACCESS