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

# GetDeviceStatus

> GetDeviceStatus

# GetDeviceStatus

入力デバイスの現在のステータスを取得します。

## 構文

```cpp theme={null}
GameInputDeviceStatus GetDeviceStatus();
```

### パラメーター

このメソッドにパラメーターはありません。

### 戻り値

型: [GameInputDeviceStatus](/reference/input/gameinput/enums/gameinputdevicestatus)

返される値は列挙型 `GameInputDeviceStatus` です。返される値は、[GameInputDeviceStatus](/reference/input/gameinput/enums/gameinputdevicestatus) の列挙型フラグ値の組み合わせになる場合があります。

## 解説

返される [GameInputDeviceStatus](/reference/input/gameinput/enums/gameinputdevicestatus) 列挙型は、デバイスが接続されているかどうか、およびゲームとデバイスの間で送受信される可能性がある入出力の種類を定義します。デバイスがシステムから切断された状態で `GetDeviceStatus` メソッドが呼び出されると、`GameInputDeviceNoStatus` 値が返されます。デバイスの状態の特定の変化に反応するために、`GameInputDeviceStatus` 列挙型を [RegisterDeviceCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback) メソッドのフィルターとして使用できます。

## 要件

**ヘッダー:** GameInput.h

[GameInput の概要](/build/core-features/common/input/overviews/input-overview)\
[GameInputDeviceStatus](/reference/input/gameinput/enums/gameinputdevicestatus)\
[RegisterDeviceCallback](/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback)\
[IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## バージョン履歴

| バージョン  | 変更点 |
| ------ | --- |
| **v0** | 導入。 |


## Related topics

- [GameInputDeviceStatus](/ja-jp/reference/input/gameinput/enums/gameinputdevicestatus.md)
- [GameInputDeviceCallback](/ja-jp/reference/input/gameinput/functions/gameinputdevicecallback.md)
- [XAsyncGetStatus](/ja-jp/reference/system/xasync/functions/xasyncgetstatus.md)
- [PFAccountManagementClientLinkIOSDeviceIDAsync](/ja-jp/services/playfab/api-references/c/pfaccountmanagement/functions/pfaccountmanagementclientlinkiosdeviceidasync.md)
- [GameInputBatteryState](/ja-jp/reference/input/gameinput/deprecated/structs/gameinputbatterystate.md)
