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

# DisconnectAllGamepads

> IXtfInputClient::DisconnectAllGamepads メソッド

# IXtfInputClient::DisconnectAllGamepads メソッド

この [IXtfInputClient](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md) インスタンスによってシミュレーションされているすべての仮想コントローラーを切断します。

## 構文

```cpp theme={null}
public:
HRESULT DisconnectAllGamepads()  
```

### 戻り値

型: HRESULT

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

## 解説

作成されたゲームパッドを切断しないと、メモリ リークが発生します。
これを回避するため、仮想コントローラー操作の完了時に `IXtfInputClient::DisconnectAllGamepads` を呼び出して、すべてのコントローラーを切断してください。
1 つの仮想コントローラーを切断するには、[IXtfInputClient::DisconnectGamepad](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md) を呼び出します。

## 要件

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

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

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

## 関連項目

[XtfInput](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/xtfinput-xbox-microsoft-n.md)\
[IXtfInputClient](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)\
[IXtfInputClient::ConnectGamepad](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)\
[IXtfInputClient::DisconnectGamepad](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)


## Related topics

- [DisconnectGamepad](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/disconnectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [ConnectGamepad](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/methods/connectgamepad-ixtfinputclient-xtfinput-xbox-windows-m.md)
- [IXtfInputClient インターフェイス (インターフェイスの内容)](https://docs.xbox.com/ja-jp/reference/tools/xtf/xtfinput/classes/IXtfInputClient/ixtfinputclient-xtfinput-xbox-windows-t.md)
- [XDspDisconnect](https://docs.xbox.com/ja-jp/reference/audio/xdspaudio/functions/xdspdisconnect.md)
- [XGameStreamingGamepadPhysicality](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/enums/xgamestreaminggamepadphysicality.md)
