IAzClientContext3::AccessCheck2 method (azroles.h)

The AccessCheck2 method returns a value that specifies whether the principal represented by the current client context is allowed to perform the specified operation.

Syntax

HRESULT AccessCheck2(
  [in]  BSTR          bstrObjectName,
  [in]  BSTR          bstrScopeName,
  [in]  long          lOperation,
  [out] unsigned long *plResult
);

Parameters

[in] bstrObjectName

The name of the accessed object. This string is used in audits.

[in] bstrScopeName

The name of the scope that contains the operation specified by the lOperation parameter.

[in] lOperation

The OperationID property of the IAzOperation object for which to check access.

[out] plResult

A pointer to a value that indicates whether the principal represented by the current client context is allowed to perform the operation specified by the lOperation parameter.

A value of NO_ERROR indicates that the principal does have permission. Any other value indicates that the principal does not have permission.

Return value

If the method succeeds, it returns S_OK.

If the method fails, it returns an error code. For a list of common error codes, see Common HRESULT Values.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header azroles.h