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

# PartyLocalEndpoint::GetLocalUser

> 获取与此本地终结点关联的本地用户。

获取与此本地终结点关联的本地用户。

## Syntax

```cpp theme={null}
PartyError GetLocalUser(  
    PartyLocalUser** localUser  
)  
```

### Parameters

**`localUser`**   [PartyLocalUser\*\*](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser.md)\
*library-allocated output, may return nullptr*

与此本地终结点关联的输出本地用户，或 nullptr。

### Return value

PartyError

如果调用成功，则返回 `c_partyErrorSuccess`；否则返回错误代码。可通过 [PartyManager::GetErrorMessage()](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage.md) 检索错误代码的可读形式。

## Remarks

如果此终结点未与用户关联，则将 `localUser` 设置为 nullptr。

## Requirements

**Header:** Party.h

## See also

[PartyLocalEndpoint](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/partylocalendpoint.md)


## Related topics

- [PartyLocalEndpoint](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/partylocalendpoint.md)
- [PartyLocalEndpoint::GetEndpointStatistics](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)
- [PartyLocalEndpoint::SendMessage](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md)
- [PartyEndpoint::GetLocal](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getlocal.md)
- [PartyLocalChatControl::GetLocalUser](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_getlocaluser.md)
