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

# WdRemoveDevice

> WdRemoveDevice

保存済みデバイスのレコードとそのメタデータを削除します。

**導入バージョン:** [RIT 0.0.14-preview](https://docs.xbox.com/ja-jp/reference/remoting/release-versions.md#release-versions)。

## 構文

```cpp theme={null}
HRESULT WD_REMOTE_ITERATION_CALL WdRemoveDevice(
    _In_z_ const char* remoteDevice
);
```

### パラメーター

`remoteDevice`\
Type: **const char\***

UTF-8 でエンコードされた、保存済みデバイスの名前または IP アドレス。この操作は、現在のユーザーのローカル カタログに対して実行されます。

### 戻り値

Type: **HRESULT**

成功した場合は `S_OK` を返します。それ以外の場合は、エラーを示す HRESULT を返します。カタログ操作では、「[XBOX PC Remote Iteration API エラー コード](https://docs.xbox.com/ja-jp/reference/remoting/error-codes.md)」で説明されているカタログ固有のエラーも返されます。

## 解説

存在しないレコードを削除しても成功します。既定のレコードを削除すると、既定の選択もクリアされます。ローカル キー、ペアリングの承認、またはエンドポイント上の承認は削除されません。

保存済みデバイスの API とペアリング ID の API は、それぞれ異なるローカル ストアを変更します。これらの API は、リモート API 呼び出しの明示的な `remoteDevice` 引数に代わるものではありません。既定のデバイスを選択したい呼び出し元は、自分で解決する必要があります。

## 要件

| 要件 | 値 |
| - | - |
| **ヘッダー** | WdRemoteIteration.h |
| **ライブラリ** | wdremoteapi.lib |
| **NuGet パッケージ** | [Microsoft.GDK.RemoteIterationClientApi](https://aka.ms/GameDevRemoteAPI) |

## 関連項目

* [XBOX PC Remote Iteration API](https://docs.xbox.com/ja-jp/reference/remoting/remoteiteration_members.md)


## Related topics

- [XBOX PC Remote Iteration API](https://docs.xbox.com/ja-jp/reference/remoting/remoteiteration_members.md)
- [WdRemoveDeviceId](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdremovedeviceid.md)
- [WdRemoveDeviceProperty](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdremovedeviceproperty.md)
- [WdRemoveDeviceMetadataNamespace](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdremovedevicemetadatanamespace.md)
- [WdEnumDevices](https://docs.xbox.com/ja-jp/reference/remoting/functions/wdenumdevices.md)
