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

# XUserGetId

> XUserGetId

# XUserGetId

특정 사용자의 사용자 ID를 가져옵니다.

## 구문

```cpp theme={null}
HRESULT XUserGetId(  
         XUserHandle user,  
         uint64_t* userId  
)  
```

### 매개변수

*user*   \_In\_\
형식: XUserHandle

사용자 ID를 가져올 사용자에 대한 핸들입니다.

*userId*   \_Out\_\
형식: uint64\_t\*

특정 사용자의 사용자 ID를 포함합니다.

### 반환값

형식: HRESULT

HRESULT 성공 또는 오류 코드입니다.

| 반환 코드                                       | 설명                                                                                                                                                 |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| S\_OK                                       | 작업이 성공했습니다.                                                                                                                                        |
| E\_GAMEUSER\_RESOLVE\_USER\_ISSUE\_REQUIRED | 사용자가 UI를 사용하여 문제를 해결해야 합니다. 사용자에게 UI를 표시하려면 [XUserResolveIssueWithUiAsync](/reference/system/xuser/functions/xuserresolveissuewithuiasync)를 호출합니다. |

## 설명

사용자의 XUID를 가져옵니다. 함수가 **E\_GAMEUSER\_RESOLVE\_USER\_ISSUE\_REQUIRED**를 반환하는 경우, 함수가 속성을 가져오기 전에 사용자가 시스템 UI를 사용하여 문제를 해결해야 합니다. 시스템 UI를 표시하고 문제를 해결하려면 [XUserResolveIssueWithUiAsync](/reference/system/xuser/functions/xuserresolveissuewithuiasync)를 호출합니다.

## 요구 사항

**헤더:** XUser.h

**라이브러리:** xgameruntime.lib

**지원되는 플랫폼:** Windows, Steam Deck, XBOX One 계열 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [Game Chat 2 C++ API 사용](/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2)

## 함께 보기

[XUser](/reference/system/xuser/xuser_members)

[XUserFindUserById](/reference/system/xuser/functions/xuserfinduserbyid)

[XUserFindUserByLocalId](/reference/system/xuser/functions/xuserfinduserbylocalid)


## Related topics

- [XUserGetLocalId](/ko/reference/system/xuser/functions/xusergetlocalid.md)
- [XUserGetMaxUsers](/ko/reference/system/xuser/functions/xusergetmaxusers.md)
- [XUserGetGamertag](/ko/reference/system/xuser/functions/xusergetgamertag.md)
- [사용자 ID 및 XUser](/ko/build/core-features/common/user/player-identity-xuser.md)
- [PC의 XStore — DRM, 라이선스 토큰, 샌드박스](/ko/publishing/xstore-commerce/xstore-pc.md)
