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

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](/reference/live/xsapi-c/social_c/handles/xblsocialrelationshipresulthandle)

Social relationship result handle.

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

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](/reference/live/xsapi-c/social_c/functions/xblsocialrelationshipresultclosehandle). 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.14x.GDK.C.lib

## See also

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


## Related topics

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