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

# XInputSetState

> XInputSetState

# XInputSetState

지정된 2모터 컨트롤러에 진동 데이터를 전송합니다.

<a id="syntaxSection" />

## 구문

```cpp theme={null}
DWORD XInputSetState(  
         DWORD dwUserIndex,  
         const XINPUT_VIBRATION * pVibration  
)  
```

<a id="parametersSection" />

### 매개변수

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

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

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

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

<a id="retvalSection" />

### 반환값

형식: DWORD

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

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

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

<a id="remarksSection" />

## 설명

이 함수는 두 개의 햅틱 피드백 모터만 있는 이전 컨트롤러를 지원합니다. 최신 컨트롤러에서 추가 피드백 모터를 지원하려면 [XInputSetStateEx](/reference/input/xinputongameinput/functions/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

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