Skip to main content

XUserGetAgeGroup

傳回使用者的年齡層。

語法

參數

user   _In_
類型:XUserHandle
要取得其年齡層的使用者。 ageGroup   _Out_
類型:XUserAgeGroup*
包含使用者的年齡層。

傳回值

類型:HRESULT HRESULT 成功或錯誤碼。

備註

擷取使用者的 XUserAgeGroup。E_GAMEUSER_RESOLVE_USER_ISSUE_REQUIRED 表示有問題需要使用者先透過系統 UI 解決,程式碼才能擷取該屬性。在此情況下,可以使用 XUserResolveIssueWithUiAsync 觸發解決問題所需的系統 UI。

需求

標頭: XUser.h 程式庫: xgameruntime.lib 支援的平台: Windows、Steam Deck、XBOX One 系列主機和 XBOX Series 主機

另請參閱

XUser XUserResolveIssueWithUiAsync
Last modified on October 6, 2026