Compartir a través de


XblAchievementsGetAchievementAsync

Gets an achievement for a player with a specific achievement ID.

Syntax

HRESULT XblAchievementsGetAchievementAsync(  
         XblContextHandle xboxLiveContext,  
         uint64_t xboxUserId,  
         const char* serviceConfigurationId,  
         const char* achievementId,  
         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.

serviceConfigurationId   _In_z_
Type: char*

The Service Configuration ID (SCID) for the title. The SCID is considered case sensitive so paste it directly from the Partner Center.

achievementId   _In_z_
Type: char*

The UTF-8 encoded unique identifier of the Achievement as defined by XDP or Dev Center.

async   _In_
Type: XAsyncBlock*

Caller allocated AsyncBlock.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

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

REST Call

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

Requirements

Header: achievements_c.h

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

See also

achievements_c