IEffectivePermission::GetEffectivePermission method (aclui.h)

The GetEffectivePermission method returns the effective permission for an object type.

Syntax

HRESULT GetEffectivePermission(
  [in]  const GUID           *pguidObjectType,
  [in]  PSID                 pUserSid,
  [in]  LPCWSTR              pszServerName,
  [in]  PSECURITY_DESCRIPTOR pSD,
  [out] POBJECT_TYPE_LIST    *ppObjectTypeList,
  [out] ULONG                *pcObjectTypeListLength,
  [out] PACCESS_MASK         *ppGrantedAccessList,
  [out] ULONG                *pcGrantedAccessListLength
);

Parameters

[in] pguidObjectType

A GUID for the object type whose permission is being queried.

[in] pUserSid

A pointer to a SID structure that represents the security principal whose effective permission is being determined.

[in] pszServerName

A pointer to null-terminated wide character string that represents the server name.

[in] pSD

A pointer to a SECURITY_DESCRIPTOR structure that represents the object's security descriptor. The security descriptor is used to perform the access check.

[out] ppObjectTypeList

A pointer to a pointer to an OBJECT_TYPE_LIST structure that represents the array of object types in the object tree for the object. If an object does not support property access, use the following technique to specify the value for the OBJECT_TYPE_LIST.

#include <windows.h>

OBJECT_TYPE_LIST g_DefaultOTL[] = {
 {0, 0, (LPGUID)&GUID_NULL},
};


[out] pcObjectTypeListLength

A pointer to a ULONG that receives the count of object types pointed to by ppObjectTypeList.

[out] ppGrantedAccessList

A pointer to a pointer to an ACCESS_MASK that receives the array of granted access masks. The operating system will use LocalFree to free the memory allocated for this parameter.

[out] pcGrantedAccessListLength

A pointer to a ULONG variable that receives the count of granted access masks pointed to by the ppGrantedAccessList parameter.

Return value

If the function is successful, the return value is S_OK.

If the function fails, the return value is an HRESULT that indicates the error. For a list of common error codes, see Common HRESULT Values.

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