> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XUserState

> XUserState

# XUserState

ユーザーの現在の状態を指定します。

## 構文

```cpp theme={null}
enum class XUserState  : uint32_t  
{  
    SignedIn = 0,  
    SigningOut = 1,  
    SignedOut = 2,  
}  
```

## 定数

| 定数 | 説明 |
| - | - |
| SignedIn | ユーザーがサインインしています。 |
| SigningOut | ユーザーがサインアウト中です。 |
| SignedOut | ユーザーがサインアウトしています。 |

## 解説

指定されたユーザーの状態を取得するには、[XUserGetState](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetstate.md) 関数を呼び出します。この関数は、XUserState 列挙型へのポインターを引数として受け取ります。

ユーザーの状態の変化を監視するには、[XUserRegisterForChangeEvent](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xuserregisterforchangeevent.md) を呼び出して [XUserChangeEvent](https://docs.xbox.com/ja-jp/reference/system/xuser/enums/xuserchangeevent.md) を購読します。

## 要件

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

**サポートされているプラットフォーム:** Windows、XBOX One ファミリ本体、XBOX Series 本体

## 関連項目

[XUser](https://docs.xbox.com/ja-jp/reference/system/xuser/xuser_members.md)

[XUserChangeEvent](https://docs.xbox.com/ja-jp/reference/system/xuser/enums/xuserchangeevent.md)

[XUserRegisterForChangeEvent](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xuserregisterforchangeevent.md)


## Related topics

- [XUserGetState](https://docs.xbox.com/ja-jp/reference/system/xuser/functions/xusergetstate.md)
- [ユーザー ID と XUser](https://docs.xbox.com/ja-jp/build/core-features/common/user/player-identity-xuser.md)
- [XUser (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xuser/xuser_members.md)
- [XblPresenceUserState](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/presence_c/enums/xblpresenceuserstate.md)
- [XblPresenceRecordGetUserState](https://docs.xbox.com/ja-jp/reference/live/xsapi-c/presence_c/functions/xblpresencerecordgetuserstate.md)
