Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The NamesFromSids method gets the display names that correspond to the specified security identifiers (SIDs).
Syntax
HRESULT NamesFromSids(
[in] VARIANT vSids,
[out] VARIANT *pvSidTypes,
[out] VARIANT *pvNames
);
Parameters
[in] vSids
An array of string representations of the SIDs to translate.
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.
[out] pvSidTypes
A pointer to an array of elements of the SID_NAME_USE enumeration that specify the types of SIDs being translated.
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 strings that contain the display names of the principals that correspond to the SIDs specified by the vSids parameter.
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. If a name could not be found for one or more of the SIDs, the corresponding array element contains an empty string.
Return value
If the method succeeds, it returns S_OK.
If the method fails, it returns an error code. If the method cannot find the display names of any of the principals, 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 |