ISecurityInformation::GetAccessRights method (aclui.h)

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.

Syntax

HRESULT GetAccessRights(
  [in]  const GUID *pguidObjectType,
  [in]  DWORD      dwFlags,
  [out] PSI_ACCESS *ppAccess,
  [out] ULONG      *pcAccesses,
  [out] ULONG      *piDefaultAccess
);

Parameters

[in] pguidObjectType

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.

[in] dwFlags

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 properties and property sets of the object.

[out] ppAccess

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.

[out] pcAccesses

A pointer to ULONG that indicates the number of entries in the ppAccess array.

[out] piDefaultAccess

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.

Return value

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.

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.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header aclui.h

See also

Access Control Editor

Access Control Editor Functions

CreateSecurityPage

EditSecurity

GUID

ISecurityInformation

ISecurityInformation::GetInheritTypes

SI_ACCESS