> ## 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.

# XblPresenceGetPresenceForSocialGroupAsync

> XblPresenceGetPresenceForSocialGroupAsync

# XblPresenceGetPresenceForSocialGroupAsync

获取特定用户组的状态信息。

## 语法

```cpp theme={null}
HRESULT XblPresenceGetPresenceForSocialGroupAsync(  
         XblContextHandle xblContextHandle,  
         const char* socialGroupName,  
         uint64_t* socialGroupOwnerXuid,  
         XblPresenceQueryFilters* filters,  
         XAsyncBlock* async  
)  
```

### 参数

*xblContextHandle*   \_In\_\
类型：[XblContextHandle](/reference/live/xsapi-c/types_c/handles/xblcontexthandle)

本地用户的 XBOX live 上下文。

*socialGroupName*   \_In\_z\_\
类型：char\*

要获取其状态的用户组名称。可以是 “Favorites”（用于检索收藏夹信息）、“People”（用于检索共同好友以及用户关注对象的信息）或 “Friends”（用于检索共同好友的信息）。

*socialGroupOwnerXuid*   \_In\_opt\_\
类型：uint64\_t\*

要针对其组进行操作的用户。如果输入为 null，则使用当前用户。

*filters*   \_In\_opt\_\
类型：[XblPresenceQueryFilters\*](/reference/live/xsapi-c/presence_c/structs/xblpresencequeryfilters)

用于筛选结果的可选筛选器结构。

*async*   \_In\_\
类型：XAsyncBlock\*

此操作的 AsyncBlock。

### 返回值

类型：HRESULT

此 API 操作的 HRESULT 返回代码。

## 备注

若要检索调用 XblPresenceGetPresenceForSocialGroupAsync 的结果，请调用 [XblPresenceGetPresenceForSocialGroupResult](/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupresult)。若要检索用于存放调用 XblPresenceGetPresenceForSocialGroupAsync 的结果所需的缓冲区大小，请调用 [XblPresenceGetPresenceForSocialGroupResultCount](/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupresultcount)。

## 要求

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

**库：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另请参阅

[presence\_c](/reference/live/xsapi-c/presence_c/presence_c_members)


## Related topics

- [XblPresenceGetPresenceForSocialGroupResult](/zh-CN/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupresult.md)
- [XblPresenceGetPresenceForSocialGroupResultCount](/zh-CN/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupresultcount.md)
- [XblPresenceQueryFilters](/zh-CN/reference/live/xsapi-c/presence_c/structs/xblpresencequeryfilters.md)
- [获取用户的 Presence](/zh-CN/services/xbox-services/community/presence/how-to/live-getting-a-users-presence.md)
- [XblPresenceGetPresenceAsync](/zh-CN/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceasync.md)
