Writes one or more achievements to the specified profile.
DWORD XUserWriteAchievements( DWORD dwNumAchievements, CONST XUSER_ACHIEVEMENT *pAchievements, PXOVERLAPPED *pOverlapped );
Returns ERROR_SUCCESS if the function succeeds and returns immediately, ERROR_IO_PENDING to indicate that the asynchronous overlapped operation is pending, or an error code otherwise. The title can pause or render a wait animation until a subsequent check (using XGetOverlappedExtendedError) for ERROR_SUCCESS is found. If the achievement has already been awarded, this function will return 1.
Titles are required to award Achievements only to the player who is the creator of the save game currently being played. Before awarding an Achievement, call XContentGetCreator to ensure that the player created the save game. There may be one or more TCRs that require or recommend the use of this function. See Technical Certification Requirements.
The buffer pointed to by pAchievements should stay valid during the entire asynchronous call. It should not be created on the stack.
Achievements can only be added to a shipped title as part of a content package and cannot be added in a title update. It is highly recommended that titles use a data-driven system to award achievements. For more information, see Achievements Overview.
Header: Declared in Xbox.h.
Library: Use Xapilib.lib.
Achievements Sample, Achievements Overview | XContentGetCreator