nn::friends::CTR::GetFriendScreenName Function

Syntax

Result GetFriendScreenName(
     char16(*) pScreenNameList[SCREEN_NAME_SIZE],
     const PrincipalId * pPrincipalIdList,
     size_t size = 1,
     bool replaceForeignCharacters = true,
     u8 * pFontRegionList = NULL
);

Arguments

Name Description
out pScreenNameList[SCREEN_NAME_SIZE] Specifies a pointer to a buffer that stores acquired screen names.
in pPrincipalIdList Specifies a pointer to a list of principal IDs.
in size Specifies the number of buffer elements in the principal ID list.
in replaceForeignCharacters When the font region of the friend's screen name is different than one's own, specifies to use "?" in place of non-ASCII characters.
in pFontRegionList Specifies a pointer to a buffer that stores the font region of a friend's screen name. Specify NULL if not needed.

Return Values

Returns the result of the operation.

Value Description
ResultSuccess Process succeeded.
ResultInvalidPointer An invalid pointer was passed in as an argument.
ResultTooLarge The size argument was too large.
ResultNotInitialized The friend presence library has not been initialized.
Other Some other result may be returned as a result of factors such as the daemon's internal state.

Description

Gets a list of friend screen names.

By calling this function, you can get the name of a friend's Mii character directly without using the Mii library. Even if you have not yet established a friend relationship with this person and cannot get his or her Mii character, the display name that you have tentatively registered is obtained.

The actual name of a friend's Mii character is obtained even when it is in the blacklist, but the obtained name is replaced with "???" if it contains profanity.

Empty screen names are returned in the given buffer if no friends correspond to the keys passed in as arguments. Even in this case, the function itself returns a value indicating success.

Revision History

2011/03/11
Noted that this function returns a value indicating success even when it returns empty screen names.
Revised some text under Description.
Added specific examples of return values.
2010/11/10
Initial version.

CONFIDENTIAL