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

# DeleteUserId

> IXtfUserClient::DeleteUserId

# IXtfUserClient::DeleteUserId

ユーザー ID で指定されたユーザーをコンソールから削除します。

## 構文

```cpp theme={null}
public:
HRESULT DeleteUserId(
         UINT32 userId
)  
```

### パラメーター

*userId*\
型: UINT32

削除するユーザーのユーザー ID。

### 戻り値

型: HRESULT

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

## 解説

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

メール アドレスを指定してユーザーを削除するには、[DeleteUser](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteuser-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

- [DeleteUser](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/methods/deleteuser-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)
- [IXtfUserClient インターフェイス (インターフェイスの目次)](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfuser/classes/IXtfUserClient/ixtfuserclient-xtfuser-xbox-windows-t.md)
- [DELETE (/users/xuid({xuid})/inbox/{messageId})](https://docs.xbox.com/ja-jp/reference/live/rest/uri/users/uri-usersxuidinboxmessageiddelete.md)
- [DELETE /titles/{titleId}/users/{xuid}/activities](https://docs.xbox.com/ja-jp/reference/live/rest/uri/multiplayeractivity/swagger-uris/uri-DeleteActivity.md)
