IAzObjectPicker::GetPrincipals method (azroles.h)

The GetPrincipals method displays a dialog box from which users can choose one or more principals, and then returns the chosen list of principals and their corresponding security identifiers (SIDs).

Syntax

HRESULT GetPrincipals(
  [in]  HWND    hParentWnd,
  [in]  BSTR    bstrTitle,
  [out] VARIANT *pvSidTypes,
  [out] VARIANT *pvNames,
  [out] VARIANT *pvSids
);

Parameters

[in] hParentWnd

A handle to the parent window of the dialog box.

[in] bstrTitle

The display title of the dialog box.

[out] pvSidTypes

A pointer to an array of elements of the SID_NAME_USE enumeration that specify the types of the SIDs that correspond to the principals chosen by the user.

This is a variant that contains either a SAFEARRAY or the JScript Array object. Each element of the array holds a VT_I4 value that specifies an element of the SID_NAME_USE enumeration.

[out] pvNames

A pointer to an array of display names of the principals chosen by the user.

This is a variant that contains either a SAFEARRAY or the JScript Array object. Each element of the array holds a VT_BSTR that contains a display name.

[out] pvSids

A pointer to an array of string representations of the SIDs that correspond to the principals chosen by the user.

This is a variant that contains either a SAFEARRAY or the JScript Array object. Each element of the array holds a VT_BSTR that contains a string representation of a SID.

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