IAzClientContext::GetRoles method (azroles.h)

The GetRoles method returns the roles for the client context.

Syntax

HRESULT GetRoles(
  [in, optional] BSTR    bstrScopeName,
  [out]          VARIANT *pvarRoleNames
);

Parameters

[in, optional] bstrScopeName

Name of the IAzScope object from which the roles returned in the pvarRoleNames parameter are applicable. If this property is NULL, the roles from the application scope are returned; otherwise, the roles from the specified scope are returned instead of the roles from the application scope.

[out] pvarRoleNames

A pointer to a VARIANT used to return a SAFEARRAY. Each element of the SAFEARRAY is a VARIANT of type BSTR that contains the name of a role to which the client belongs at the scope specified by the bstrScopeName parameter.

Return value

The return value is an HRESULT. A value of S_OK indicates success. Any other value indicates that the operation failed.

Remarks

In JScript, the returned SAFEARRAY must be converted to the JScript Array object.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header azroles.h
Library Azroles.lib
DLL Azroles.dll
Redistributable Windows Server 2003 Administration Tools Pack on Windows XP