IAzNameResolver::NameFromSid method (azroles.h)

The NameFromSid method gets the display name that corresponds to the specified security identifier (SID).

Syntax

HRESULT NameFromSid(
  [in]  BSTR bstrSid,
  [out] long *pSidType,
  [out] BSTR *pbstrName
);

Parameters

[in] bstrSid

The string representation of the SID to translate.

[out] pSidType

An element of the SID_NAME_USE enumeration that specifies the type of SID being translated.

[out] pbstrName

A pointer to the display name of the principal that corresponds to the SID specified by the bstrSid parameter.

Return value

If the method succeeds, it returns S_OK.

If the method fails, it returns an error code. In particular, if the method cannot find the display name of the principal, it returns CO_E_NOMATCHINGNAMEFOUND. For a list of other 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