Syntax
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 ReturnsS_OK on success. Possible error codes include the following. This list isn’t exhaustive.
Remarks
Sorting is supported only on unlock time. When sortField isXblAchievementOrderBy::UnlockTime, set sortOrder to XblAchievementsManagerSortOrder::Ascending or XblAchievementsManagerSortOrder::Descending. For any other sortField, set sortOrder to XblAchievementsManagerSortOrder::Unsorted. Other combinations return E_INVALIDARG.
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.
