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

# PartyLocalEndpoint::GetLocalUser

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

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

## Syntax

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

### Parameters

**`localUser`**   [PartyLocalUser\*\*](/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser)\
*library-allocated output, may return nullptr*

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

### Return value

PartyError

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

## Remarks

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

## Requirements

**Header:** Party.h

## See also

[PartyLocalEndpoint](/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/partylocalendpoint)


## Related topics

- [PartyLocalEndpoint](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/partylocalendpoint.md)
- [PartyLocalEndpoint::GetEndpointStatistics](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_getendpointstatistics.md)
- [PartyLocalEndpoint::SendMessage](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_sendmessage.md)
- [PartyEndpoint::GetLocal](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyEndpoint/methods/partyendpoint_getlocal.md)
- [PartyLocalEndpoint::FlushMessages](/zh-CN/services/playfab/multiplayer/networking/reference/classes/PartyLocalEndpoint/methods/partylocalendpoint_flushmessages.md)
