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

> 取得與此本機端點相關聯的本機使用者。

取得與此本機端點相關聯的本機使用者。

## 語法

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

### 參數

**`localUser`**   [PartyLocalUser\*\*](/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyLocalUser/partylocaluser)\
*程式庫配置的輸出，可能傳回 nullptr*

與此本機端點相關聯的輸出本機使用者，或 nullptr。

### 傳回值

PartyError

`c_partyErrorSuccess` (如果呼叫成功)，否則為錯誤碼。可透過 [PartyManager::GetErrorMessage()](/zh-TW/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage) 擷取錯誤碼的人類可讀形式。

## 備註

如果此端點未與使用者相關聯，`localUser` 會設為 nullptr。

## 需求

**標頭：** Party.h

## 另請參閱

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


## Related topics

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