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

# XInputSetStateEx

> XInputSetStateEx

# XInputSetStateEx

지정된 컨트롤러에 진동 데이터를 전송합니다. 최신 컨트롤러의 4모터 진동 기능을 지원합니다.

<a id="syntaxSection" />

## 구문

```cpp theme={null}
DWORD XInputSetStateEx(  
         DWORD dwUserIndex,  
         const XINPUT_VIBRATION_EX * pVibration  
)  
```

<a id="parametersSection" />

### 매개변수

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

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

*pVibration*   \_In\_\
형식: [XINPUT\_VIBRATION\_EX](/reference/input/xinputongameinput/structs/xinput_vibration_ex)\*

컨트롤러로 전송할 진동 정보가 포함된 [XINPUT\_VIBRATION\_EX](/reference/input/xinputongameinput/structs/xinput_vibration_ex) 객체에 대한 포인터입니다.

<a id="retvalSection" />

### 반환값

형식: DWORD

함수가 성공하면 `ERROR_SUCCESS`를 반환합니다.

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

함수가 실패하면 WinError.h에 정의된 오류 코드를 반환합니다.

<a id="remarksSection" />

## 설명

이 함수는 2모터 컨트롤러와의 상호 작용 중에도 호출해도 안전합니다. 2모터 컨트롤러에 대해 `XInputSetStateEx`로 전송되는 모든 진동 설정은 컨트롤러가 여전히 전송된 입력에 가장 근접하게 진동하도록 조정됩니다. 따라서 [XInputSetState](/reference/input/xinputongameinput/functions/xinputsetstate)를 호출할 상황에서 `XInputSetStateEx`를 호출하는 것이 좋습니다.

자세한 내용은 [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

- [XInputSetState](/ko/reference/input/xinputongameinput/functions/xinputsetstate.md)
- [XINPUT_VIBRATION_EX](/ko/reference/input/xinputongameinput/structs/xinput_vibration_ex.md)
- [XINPUT_VIBRATION](/ko/reference/input/xinputongameinput/structs/xinput_vibration.md)
- [XInputOnGameInput](/ko/reference/input/xinputongameinput/xinputongameinput_members.md)
- [XInput에서 GameInput으로 포팅](/ko/build/core-features/common/input/porting/input-porting-xinput.md)
