> ## 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/zh-TW/reference/remoting/release-versions.md#release-versions)。

## 語法

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

### 參數

`remoteDevice`\
類型：**const char\***

以 UTF-8 編碼的已儲存裝置名稱或 IP 位址。此作業會作用於目前使用者的本機目錄。

### 傳回值

類型：**HRESULT**

成功時傳回 `S_OK`；否則傳回失敗 HRESULT。目錄作業也會傳回[錯誤碼](https://docs.xbox.com/zh-TW/reference/remoting/error-codes.md)中所述的目錄特有錯誤。

## 備註

移除不存在的記錄會成功。移除預設記錄也會清除預設選取。這不會移除本機金鑰、配對授權或端點上的授權。

已儲存裝置 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/zh-TW/reference/remoting/remoteiteration_members.md)


## Related topics

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