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

# DeleteUser

> IXtfUserClient::DeleteUser

# IXtfUserClient::DeleteUser

メール アドレスで指定されたユーザーをコンソールから削除します。

## 構文

```cpp theme={null}
public:
HRESULT DeleteUser(
         LPCWSTR userName
)  
```

### パラメーター

*userName*\
型: LPCWSTR

コンソールにユーザーを追加するときに使用したメール アドレス。

### 戻り値

型: HRESULT

HRESULT の成功またはエラー コード。

## 解説

ユーザーがコンソールにサインインしている場合、削除前にそのユーザーはサインアウトされます。

ユーザー ID を指定してユーザーを削除するには、[DeleteUserId](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteuserid-ixtfuserclient-xtfuser-xbox-windows-m.md) を使用します。

すべてのユーザーを削除するには、[DeleteAllUsers](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteallusers-ixtfuserclient-xtfuser-xbox-windows-m.md) を使用します。

ユーザーを追加するには、[AddUser](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/adduser-ixtfuserclient-xtfuser-xbox-windows-m.md) を使用します。

## 要件

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

**ライブラリ:** xtfuser.lib

**対応プラットフォーム:** Windows (XBOX コンソール ツール用)

## 関連項目

[IXtfUserClient インターフェイス](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/ixtfuserclient-xtfuser-xbox-windows-t.md)


## Related topics

- [DeleteUserId](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteuserid-ixtfuserclient-xtfuser-xbox-windows-m.md)
- [DeleteAllUsers](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteallusers-ixtfuserclient-xtfuser-xbox-windows-m.md)
- [PlayFab リリースノート 2018](https://docs.xbox.com/ja-jp/services/playfab/release-notes/2018.md)
- [PlayFab リリースノート 2017](https://docs.xbox.com/ja-jp/services/playfab/release-notes/2017.md)
- [IXtfUserClient インターフェイス (インターフェイスの目次)](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/ixtfuserclient-xtfuser-xbox-windows-t.md)
