> ## 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](/zh-TW/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\*](/zh-TW/reference/live/xsapi-c/presence_c/structs/xblpresencequeryfilters)

用來篩選結果的選用篩選條件結構。

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

此作業的 AsyncBlock。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

若要擷取呼叫 XblPresenceGetPresenceForSocialGroupAsync 的結果，請呼叫 [XblPresenceGetPresenceForSocialGroupResult](/zh-TW/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupresult)。若要擷取保存呼叫 XblPresenceGetPresenceForSocialGroupAsync 之結果所需的緩衝區大小，請呼叫 [XblPresenceGetPresenceForSocialGroupResultCount](/zh-TW/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupresultcount)。

## 需求

**標頭：** presence\_c.h

**程式庫：** Microsoft.Xbox.Services.14x.GDK.C.lib

## 另請參閱

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


## Related topics

- [XblPresenceGetPresenceForSocialGroupAsync](/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupasync.md)
- [XblPresenceGetPresenceForSocialGroupResult](/reference/live/xsapi-c/presence_c/functions/xblpresencegetpresenceforsocialgroupresult.md)
