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( [in] const GUID *pguidObjectType, [in] DWORD dwFlags, [out] PSI_ACCESS *ppAccess, [out] ULONG *pcAccesses, [out] ULONG *piDefaultAccess );
- pguidObjectType [in]
A 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.
- ppAccess [out]
A pointer to an array of SI_ACCESS structures. The array must 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]
A pointer to ULONG that indicates the number of entries in the ppAccess array.
- piDefaultAccess [out]
A pointer to ULONG that indicates 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.
If the function succeeds, the function returns S_OK.
If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.
The GetAccessRights method is called each time a property page is initialized.
The access control editor does not free the pointer returned in ppAccess.
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
- Access Control Editor
- Access Control Editor Functions