XblAchievementsGetAchievementsForTitleIdAsync

Gets the first page of achievements for a player of the specified title.

Syntax

HRESULT XblAchievementsGetAchievementsForTitleIdAsync(  
         XblContextHandle xboxLiveContext,  
         uint64_t xboxUserId,  
         uint32_t titleId,  
         XblAchievementType type,  
         bool unlockedOnly,  
         XblAchievementOrderBy orderBy,  
         uint32_t skipItems,  
         uint32_t maxItems,  
         XAsyncBlock* async  
)  

Parameters

xboxLiveContext   _In_
Type: XblContextHandle

An xbox live context handle created with XblContextCreateHandle.

xboxUserId   _In_
Type: uint64_t

The Xbox User ID of the player.

titleId   _In_
Type: uint32_t

The title ID.

type   _In_
Type: XblAchievementType

The achievement type to retrieve.

unlockedOnly   _In_
Type: bool

Indicates whether to return unlocked achievements only.

orderBy   _In_
Type: XblAchievementOrderBy

Controls how the list of achievements is ordered.

skipItems   _In_
Type: uint32_t

The number of achievements to skip.

maxItems   _In_
Type: uint32_t

The maximum number of achievements the result can contain. Pass 0 to attempt to retrieve all items.

async   _In_
Type: XAsyncBlock*

Caller allocated AsyncBlock.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

To get the result, call XblAchievementsGetAchievementsForTitleIdResult inside the AsyncBlock callback or after the AsyncBlock is complete.

REST Call

V2 GET /users/xuid({xuid})/achievements

Requirements

Header: achievements_c.h

Library: Microsoft.Xbox.Services.141.GSDK.C.lib

See also

achievements_c