Your code uses a different process to retrieve the user pictures for remote user than it uses to retrive those for local user.
At design time, you must determine two things: which picture is appropriate for your use, and the size of the picture you will request.
Note This procedure is only used for user on a remote console. To retrieve the picture for a user on the local console, see How to: Retrieve a local user’s picture.
auto userList = ref new Vector<String^>();
userList->Append(xboxUserId);
auto pAsyncOp = requester->ProfileService->GetUserProfilesAsync(userList->GetView());
String^ gameDisplayPicResizeUri;
create_task( pAsyncOp )
.then( [this] (task<XboxUserProfile^> resultTask)
{
try
{
IVectorView<XboxUserProfile^>^ results = resultTask.get();
for (XboxUserProfile^ profile : results)
{
if( profile->GameDisplayPictureResizeUri != nullptr )
{
// Retrieve small image size URI by appending size query strings.
gameDisplayPicResizeUri = String::Concat( profile->GameDisplayPictureResizeUri->AbsoluteUri, L"&format=png&w=64&h=64" );
}
}
catch (Platform::Exception^ ex)
{
// Handle error
}
});