XInputGetBatteryInformation function
Retrieves the battery type and charge status of a wireless controller.
Syntax
DWORD XInputGetBatteryInformation( _In_ DWORD dwUserIndex, _In_ BYTE devType, _Out_ XINPUT_BATTERY_INFORMATION *pBatteryInformation );
Parameters
- dwUserIndex [in]
-
Index of the signed-in gamer associated with the device. Can be a value in the range 0–XUSER_MAX_COUNT − 1.
- devType [in]
-
Specifies which device associated with this user index should be queried. Must be BATTERY_DEVTYPE_GAMEPAD or BATTERY_DEVTYPE_HEADSET.
- pBatteryInformation [out]
-
Pointer to an XINPUT_BATTERY_INFORMATION structure that receives the battery information.
Return value
If the function succeeds, the return value is ERROR_SUCCESS.
Platform Requirements
Windows 8 (XInput 1.4), DirectX SDK (XInput 1.3)
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also
Show: