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

# XInputGetBatteryInformation

> XInputGetBatteryInformation

# XInputGetBatteryInformation

무선 컨트롤러의 배터리 유형과 충전 상태를 검색합니다.

<a id="syntaxSection" />

## 구문

```cpp theme={null}
DWORD XInputGetBatteryInformation(  
         DWORD dwUserIndex,  
         BYTE devType,  
         XINPUT_BATTERY_INFORMATION* pBatteryInformation  
)  
```

<a id="parametersSection" />

### 매개변수

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

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

*devType*   \_In\_\
형식: BYTE

쿼리할 *dwUserIndex*와 연결된 장치의 유형입니다. `BATTERY_DEVTYPE_GAMEPAD` 또는 `BATTERY_DEVTYPE_HEADSET`이어야 합니다.

*pBatteryInformation*   \_Out\_\
형식: [XINPUT\_BATTERY\_INFORMATION](/reference/input/xinputongameinput/structs/xinput_battery_information)\*

배터리 정보를 받는 [XINPUT\_BATTERY\_INFORMATION](/reference/input/xinputongameinput/structs/xinput_battery_information) 객체에 대한 포인터입니다.

<a id="retvalSection" />

### 반환값

형식: DWORD

함수가 성공하면 반환값은 `ERROR_SUCCESS`입니다.

<a id="remarksSection" />

## 설명

*pBatteryInformation*에 반환되는 값은 배터리 유형과 충전 상태를 지정합니다. 충전 상태는 알려진 배터리 유형이 있는 장치에만 유효합니다.

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

- [XINPUT_BATTERY_INFORMATION](/ko/reference/input/xinputongameinput/structs/xinput_battery_information.md)
- [XInputOnGameInput](/ko/reference/input/xinputongameinput/xinputongameinput_members.md)
- [IGameInputDevice::GetBatteryState](/ko/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getbatterystate.md)
- [GameInputBatteryState](/ko/reference/input/gameinput/deprecated/structs/gameinputbatterystate.md)
- [GameInputBatteryStatus](/ko/reference/input/gameinput/deprecated/enums/gameinputbatterystatus.md)
