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

# XInputGetDeviceId

> XInputGetDeviceId

# XInputGetDeviceId

지정된 컨트롤러의 장치 ID를 검색합니다.

<a id="syntaxSection" />

## 구문

```cpp theme={null}
DWORD XInputGetDeviceId(  
         DWORD dwUserIndex,  
         APP_LOCAL_DEVICE_ID * pDeviceId  
)  
```

<a id="parametersSection" />

### 매개변수

*dwUserIndex*   \_In\_\
형식: DWORD

장치와 연결된 게이머의 인덱스입니다. 값은 0에서 `XUSER_MAX_COUNT - 1` 범위입니다.

*pDeviceId*   \_Out\_\
형식: APP\_LOCAL\_DEVICE\_ID\*

지정된 사용자 인덱스의 장치 ID입니다.

<a id="retvalSection" />

### 반환값

형식: DWORD

함수가 장치 ID를 성공적으로 검색하면 `ERROR_SUCCESS`를 반환합니다.

컨트롤러가 연결되어 있지 않으면 함수는 `ERROR_DEVICE_NOT_CONNECTED`를 반환합니다.

함수가 실패하면 Win32 오류 코드를 반환합니다.

<a id="remarksSection" />

## 설명

애플리케이션 로컬 장치 ID는 타이틀 또는 시스템의 재시작 후에도 장치를 고유하게 식별합니다. 자세한 내용은 [장치 ID](/build/core-features/common/input/overviews/input-devices#deviceIdsSection)를 참조하세요.

XInputOnGameInput 사용에 대한 자세한 내용은 [XInputOnGameInput 래퍼](/build/core-features/common/input/porting/input-porting-xinput#xinputWrapperSection)를 참조하세요.

<a id="requirementsSection" />

## 요구 사항

**헤더:** XInputOnGameInput.h

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

**지원 플랫폼:** XBOX One 제품군 콘솔 및 XBOX Series 콘솔

<a id="seealsoSection" />

## 참고 항목

[XInput에서 GameInput으로 이식](/build/core-features/common/input/porting/input-porting-xinput)\
[XInputOnGameInput](/reference/input/xinputongameinput/xinputongameinput_members)


## Related topics

- [APP_LOCAL_DEVICE_ID](/ko/reference/system/xuser/structs/app_local_device_id.md)
- [XInputOnGameInput](/ko/reference/input/xinputongameinput/xinputongameinput_members.md)
- [사용자 및 입력 장치](/ko/build/core-features/common/user/users-input-devices.md)
- [XInput에서 GameInput으로 포팅](/ko/build/core-features/common/input/porting/input-porting-xinput.md)
- [IGameInputDevice::GetRawDeviceFeature](/ko/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getrawdevicefeature.md)
