IAzClientContext3::AccessCheck2 method

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(
  BSTR          bstrObjectName,
  BSTR          bstrScopeName,
  long          lOperation,
  unsigned long *plResult
);

Parameters

bstrObjectName

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

bstrScopeName

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

lOperation

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

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

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