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

# XUserFindUserByLocalId

> XUserFindUserByLocalId

# XUserFindUserByLocalId

특정 로컬 사용자 ID에 대한 사용자 핸들을 가져옵니다.

## 구문

```cpp theme={null}
HRESULT XUserFindUserByLocalId(  
         XUserLocalId userLocalId,  
         XUserHandle* handle  
)  
```

### 매개변수

*userLocalId*   \_In\_\
형식: [XUserLocalId](https://docs.xbox.com/ko/reference/system/xuser/structs/xuserlocalid.md)

사용자를 가져올 로컬 ID입니다.

*handle*   \_Out\_\
형식: XUserHandle\*

특정 로컬 사용자 ID와 연결된 사용자에 대한 핸들을 포함합니다.

### 반환값

> [!NOTE]
>
> 이 함수는 시간에 민감한 스레드에서 호출하기에 안전하지 않습니다. 자세한 내용은 [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)를 참조하십시오.

형식: HRESULT

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

| 반환 코드 | 설명 |
| - | - |
| S\_OK | 작업이 성공했습니다. |
| HRESULT\_FROM\_WIN32(ERROR\_NOT\_FOUND) | 사용자를 찾을 수 없습니다. |

## 설명

**XUserFindUserByLocalId**를 포함하여 **XUser** API에서 가져오는 각 **XUserHandle** 핸들에 대해
[XUserCloseHandle](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserclosehandle.md)을 호출하여 해당 핸들을 닫아야 합니다. Get / Find 함수를 호출한 후에는 핸들의 참조 카운트가 증가합니다.

특정 로컬 사용자 ID에 대한 사용자 핸들을 가져오려면 XUserFindUserByLocalId를 호출합니다.

로컬 사용자의 XBOX 사용자 ID(XUID)를 가져오려면 [XUserFindUserById](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserfinduserbyid.md)를 호출합니다.

특정 장치 ID에 대한 사용자 ID를 가져오려면 [XUserFindForDevice](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserfindfordevice.md)를 호출합니다.

## 요구 사항

**헤더:** XUser.h

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

**지원되는 플랫폼:** Windows, Steam Deck, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [시간에 민감한 스레드](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 함께 보기

[XUser](https://docs.xbox.com/ko/reference/system/xuser/xuser_members.md)

[XUserFindUserById](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserfinduserbyid.md)

[XUserFindForDevice](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserfindfordevice.md)


## Related topics

- [XUserFindUserById](https://docs.xbox.com/ko/reference/system/xuser/functions/xuserfinduserbyid.md)
- [XUserLocalId](https://docs.xbox.com/ko/reference/system/xuser/structs/xuserlocalid.md)
- [XUserGetId](https://docs.xbox.com/ko/reference/system/xuser/functions/xusergetid.md)
- [XUser (API 콘텐츠)](https://docs.xbox.com/ko/reference/system/xuser/xuser_members.md)
- [Unity 프로젝트에서 GDK API용 C# 래퍼 사용](https://docs.xbox.com/ko/build/gdk-and-engines/unity/unity-api-wrappers.md)
