> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblUserProfile

> XblUserProfile

# XblUserProfile

表示用户的 XBOX Live 配置文件。

## 语法

```cpp theme={null}
typedef struct XblUserProfile {  
    uint64_t xboxUserId;  
    char appDisplayName[XBL_DISPLAY_NAME_CHAR_SIZE];  
    char appDisplayPictureResizeUri[XBL_DISPLAY_PIC_URL_RAW_CHAR_SIZE];  
    char gameDisplayName[XBL_DISPLAY_NAME_CHAR_SIZE];  
    char gameDisplayPictureResizeUri[XBL_DISPLAY_PIC_URL_RAW_CHAR_SIZE];  
    char gamerscore[XBL_GAMERSCORE_CHAR_SIZE];  
    char gamertag[XBL_GAMERTAG_CHAR_SIZE];  
    char modernGamertag[XBL_MODERN_GAMERTAG_CHAR_SIZE];  
    char modernGamertagSuffix[XBL_MODERN_GAMERTAG_SUFFIX_CHAR_SIZE];  
    char uniqueModernGamertag[XBL_UNIQUE_MODERN_GAMERTAG_CHAR_SIZE];  
} XblUserProfile  
```

### 成员

*xboxUserId*\
类型：uint64\_t

用户的 XBOX 用户 ID。

*appDisplayName*\
类型：char\[XBL\_DISPLAY\_NAME\_CHAR\_SIZE]

用于应用程序 UI 中的用户显示名称的 UTF-8 编码。它始终为用户的玩家代号，并且与 gameDisplayName 字段相同。

*appDisplayPictureResizeUri*\
类型：char\[XBL\_DISPLAY\_PIC\_URL\_RAW\_CHAR\_SIZE]

用户的玩家图片的 UTF-8 编码 Uri。它始终与 gameDisplayPictureResizeUri 字段相同。该 Uri 是可调整大小的 Uri。可以通过追加 '\&format={format}\&w={width}\&h={height} 来指定以下大小和格式之一：<br /> 格式：png<br /> 宽度 高度<br /> 64 64<br /> 208 208<br /> 424 424<br />

*gameDisplayName*\
类型：char\[XBL\_DISPLAY\_NAME\_CHAR\_SIZE]

用于应用程序 UI 中的用户显示名称的 UTF-8 编码。它始终为用户的玩家代号，并且与 appDisplayName 字段相同。

*gameDisplayPictureResizeUri*\
类型：char\[XBL\_DISPLAY\_PIC\_URL\_RAW\_CHAR\_SIZE]

用户的玩家图片的 UTF-8 编码 Uri。它始终与 appDisplayPictureResizeUri 字段相同。该 Uri 是可调整大小的 Uri。可以通过追加 '\&format={format}\&w={width}\&h={height} 来指定以下大小和格式之一：<br /> 格式：png<br /> 宽度 高度<br /> 64 64<br /> 208 208<br /> 424 424<br />

*gamerscore*\
类型：char\[XBL\_GAMERSCORE\_CHAR\_SIZE]

用户 Gamerscore 的 UTF-8 编码。

*gamertag*\
类型：char\[XBL\_GAMERTAG\_CHAR\_SIZE]

用户经典玩家代号的 UTF-8 编码。此字段仅使用 ASCII 字符，且不包含后缀。

*modernGamertag*\
类型：char\[XBL\_MODERN\_GAMERTAG\_CHAR\_SIZE]

用户新式玩家代号的 UTF-8 编码。此字段使用特定范围的 UTF-8 字符，且不包含后缀。不保证唯一。

*modernGamertagSuffix*\
类型：char\[XBL\_MODERN\_GAMERTAG\_SUFFIX\_CHAR\_SIZE]

附加到新式玩家代号以确保唯一性的数字后缀的 UTF-8 编码。在某些情况下可能为空。

*uniqueModernGamertag*\
类型：char\[XBL\_UNIQUE\_MODERN\_GAMERTAG\_CHAR\_SIZE]

新式玩家代号和数字后缀合并后的唯一值的 UTF-8 编码。格式为 “modernGamertag#suffix”。保证呈现字符数不超过 16。

## 参数属于

[XblProfileGetUserProfileResult](/reference/live/xsapi-c/profile_c/functions/xblprofilegetuserprofileresult)\
[XblProfileGetUserProfilesResult](/reference/live/xsapi-c/profile_c/functions/xblprofilegetuserprofilesresult)\
[XblProfileGetUserProfilesForSocialGroupResult](/reference/live/xsapi-c/profile_c/functions/xblprofilegetuserprofilesforsocialgroupresult)

## 要求

**头文件：** profile\_c.h

## 另请参阅

[profile\_c](/reference/live/xsapi-c/profile_c/profile_c_members)


## Related topics

- [XblProfileGetUserProfileResult](/zh-CN/reference/live/xsapi-c/profile_c/functions/xblprofilegetuserprofileresult.md)
- [XblProfileGetUserProfilesResult](/zh-CN/reference/live/xsapi-c/profile_c/functions/xblprofilegetuserprofilesresult.md)
- [XblProfileGetUserProfilesForSocialGroupResult](/zh-CN/reference/live/xsapi-c/profile_c/functions/xblprofilegetuserprofilesforsocialgroupresult.md)
- [现代游戏玩家代号的最佳实践和测试](/zh-CN/services/xbox-services/fundamentals/identity/user-profile/gamertags/live-modern-gamertags-best-practices-and-testing.md)
- [XblProfileGetUserProfileAsync](/zh-CN/reference/live/xsapi-c/profile_c/functions/xblprofilegetuserprofileasync.md)
