Freigeben über


XblAchievementsManagerGetAchievements

Gets a list of all achievements for a player.

Syntax

HRESULT XblAchievementsManagerGetAchievements(  
         uint64_t xboxUserId,  
         XblAchievementOrderBy sortField,  
         XblAchievementsManagerSortOrder sortOrder,  
         XblAchievementsManagerResultHandle* achievementsResult  
)  

Parameters

xboxUserId   _In_
Type: uint64_t

The Xbox User ID of the player.

sortField   _In_
Type: XblAchievementOrderBy

The field to sort the list of achievements on.

sortOrder   _In_
Type: XblAchievementsManagerSortOrder

The direction by which to sort the list of achievements.

achievementsResult   _Outptr_result_maybenull_
Type: XblAchievementsManagerResultHandle*

The handle to the result of AchievementsManager API calls. This handle is used by other APIs to get the achievement objects matching the API that was called. The handle must be closed using XblAchievementsManagerResultCloseHandle when the result is no longer needed.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

Passing in XblAchievementOrderBy::TitleId for sortField yields the same results as passing in XblAchievementOrderBy::DefaultOrder since all achievements tracked by achievement manager will have the same TitleId.

Requirements

Header: achievements_manager_c.h

Library: Microsoft.Xbox.Services.14x.GDK.C.lib

See also

achievements_manager_c