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

# XblSocialRelationshipResultGetRelationships

> XblSocialRelationshipResultGetRelationships

Get a list of the XblSocialRelationship objects from an XblSocialRelationshipResultHandle.

## Syntax

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

### Parameters

*resultHandle*   \_In\_\
Type: [XblSocialRelationshipResultHandle](https://docs.xbox.com/reference/live/xsapi-c/social_c/handles/xblsocialrelationshipresulthandle.md)

Social relationship result handle.

*relationships*   \_Out\_\
Type: [XblSocialRelationship\*\*](https://docs.xbox.com/reference/live/xsapi-c/social_c/structs/xblsocialrelationship.md)

Passes back a pointer to an array of XblSocialRelationship objects. The memory for the returned pointer remains valid for the life of the XblSocialRelationshipResultHandle object until it is closed.

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

Passes back the number of items in the relationships array.

### Return value

Type: HRESULT

HRESULT return code for this API operation.

## Remarks

When no longer using the XblSocialRelationshipResultHandle, make sure to call [XblSocialRelationshipResultCloseHandle](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultclosehandle.md). When all outstanding handles have been closed, the memory associated with the social relationship's results list will be freed.

## Requirements

**Header:** social\_c.h

**Library:** Microsoft.Xbox.Services.142.C.lib or Microsoft.Xbox.Services.143.C.lib

## See also

[social\_c](https://docs.xbox.com/reference/live/xsapi-c/social_c/social_c_members.md)


## Related topics

- [Getting a social relationship](https://docs.xbox.com/services/xbox-services/community/people-system/how-to/live-getting-a-social-relationship.md)
- [XblSocialRelationship](https://docs.xbox.com/reference/live/xsapi-c/social_c/structs/xblsocialrelationship.md)
- [XblSocialGetSocialRelationshipsResult](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialgetsocialrelationshipsresult.md)
- [XblSocialRelationshipResultGetNextResult](https://docs.xbox.com/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultgetnextresult.md)
- [social_c (contents)](https://docs.xbox.com/reference/live/xsapi-c/social_c/social_c_members.md)
