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

# XblSocialManagerGetLocalUsers

> XblSocialManagerGetLocalUsers

# XblSocialManagerGetLocalUsers

傳回 SocialManager 所追蹤之所有使用者的使用者控制代碼。

## 語法

```cpp theme={null}
HRESULT XblSocialManagerGetLocalUsers(  
         size_t usersCount,  
         XblUserHandle* users  
)  
```

### 參數

*usersCount*   \_In\_\
類型：size\_t

使用者控制代碼陣列的大小。

*users*   \_Out\_writes\_(usersCount)\
類型：XblUserHandle\*

傳回指向要填入本機使用者之陣列的指標。此陣列只在下次呼叫 XblSocialManagerDoWork 之前有效。傳回的使用者控制代碼並非複製的副本，因此請勿對其呼叫關閉。

### 傳回值

類型：HRESULT

此 API 作業的 HRESULT 傳回碼。

## 備註

傳回控制代碼之前不會呼叫複製控制代碼，因此如果從 SocialManager 移除使用者之後仍需要該使用者，就必須呼叫複製控制代碼。請務必已呼叫 [XblSocialManagerAddLocalUser](/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanageraddlocaluser)，為至少一位本機使用者建立社交圖表。此外，請呼叫 [XblSocialManagerGetLocalUserCount](/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagergetlocalusercount) 以取得目前追蹤的本機使用者數目。

## 需求

**標頭：** social\_manager\_c.h

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

## 另請參閱

[social\_manager\_c](/zh-TW/reference/live/xsapi-c/social_manager_c/social_manager_c_members)


## Related topics

- [XblSocialManagerGetLocalUserCount](/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagergetlocalusercount.md)
- [XblSocialManagerUserGroupGetLocalUser](/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerusergroupgetlocaluser.md)
- [XblSocialManagerRemoveLocalUser](/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerremovelocaluser.md)
- [XblSocialManagerAddLocalUser](/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanageraddlocaluser.md)
- [XblSocialManagerUserGroupGetUsers](/zh-TW/reference/live/xsapi-c/social_manager_c/functions/xblsocialmanagerusergroupgetusers.md)
