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

# XblSocialRelationshipResultGetRelationships

> XblSocialRelationshipResultGetRelationships

# XblSocialRelationshipResultGetRelationships

XblSocialRelationshipResultHandle から XblSocialRelationship オブジェクトの一覧を取得します。

## 構文

```cpp theme={null}
HRESULT XblSocialRelationshipResultGetRelationships(  
         XblSocialRelationshipResultHandle resultHandle,  
         const XblSocialRelationship** relationships,  
         size_t* relationshipsCount  
)  
```

### パラメーター

*resultHandle*   \_In\_\
型: [XblSocialRelationshipResultHandle](/reference/live/xsapi-c/social_c/handles/xblsocialrelationshipresulthandle)

ソーシャル リレーションシップ結果ハンドル。

*relationships*   \_Out\_\
型: [XblSocialRelationship\*\*](/reference/live/xsapi-c/social_c/structs/xblsocialrelationship)

XblSocialRelationship オブジェクトの配列へのポインターを返します。返されたポインターのメモリは、XblSocialRelationshipResultHandle オブジェクトが閉じられるまで有効なままです。

*relationshipsCount*   \_Out\_\
型: size\_t\*

relationships 配列内の項目数を返します。

### 戻り値

型: HRESULT

この API 操作の HRESULT 戻り値コード。

## 解説

XblSocialRelationshipResultHandle が不要になったら、必ず [XblSocialRelationshipResultCloseHandle](/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultclosehandle) を呼び出してください。未処理のハンドルがすべて閉じられると、ソーシャル リレーションシップの結果一覧に関連付けられているメモリが解放されます。

## 要件

**ヘッダー:** social\_c.h

**ライブラリ:** Microsoft.Xbox.Services.14x.GDK.C.lib

## 関連項目

[social\_c](/reference/live/xsapi-c/social_c/social_c_members)


## Related topics

- [XblSocialRelationship](/ja-jp/reference/live/xsapi-c/social_c/structs/xblsocialrelationship.md)
- [XblSocialGetSocialRelationshipsResult](/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsresult.md)
- [XblSocialRelationshipResultGetNextResult](/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgetnextresult.md)
- [ソーシャル リレーションシップの取得](/ja-jp/services/xbox-services/community/people-system/how-to/live-getting-a-social-relationship.md)
- [XblSocialRelationshipResultGetTotalCount](/ja-jp/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgettotalcount.md)
