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

# SetConfigValue

> IXtfConsoleControlClient::SetConfigValue

# IXtfConsoleControlClient::SetConfigValue

設定指定之組態設定的值。

## 語法

```cpp theme={null}
HRESULT SetConfigValue(
         LPCWSTR pszKey,
         LPCWSTR pszValue
)  
```

### 參數

*pszKey*\
類型：LPCWSTR

指向要設定其值之組態設定名稱的指標。

*pszValue*\
類型：LPCWSTR

指向要為 *pszKey* 中所指定組態設定設定之值的指標。

### 傳回值

類型：HRESULT

如果成功，則傳回 `S_OK`；否則傳回 HRESULT 錯誤碼。

## 備註

此函式會為目前的開發主機設定單一組態設定的值。如果 `pszKey` 設為指向包含有效組態設定名稱 (或索引鍵) 之字串的指標，函式會傳回 `S_OK`，並將該組態設定的值設為 `pszValue` 中所指定指標處的字串。否則，函式會傳回錯誤。

如需使用 XBOX Tools Framework (XTF) 存取組態設定的詳細資訊，請參閱[組態 (xbconfig.exe) (NDA 主題)](https://docs.xbox.com/zh-TW/tools/tools-console/commandlinetools/xbconfig.md)。

## 需求

**標頭：** xtfconsolecontrol.h

**程式庫：** xtfconsolecontrol.lib

**支援的平台：** Windows (適用於 XBOX 主機工具)

## 另請參閱

[IXtfConsoleControlClient::GetConfigValue](https://docs.xbox.com/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigvalue.md)\
[IXtfConsoleControlClient](https://docs.xbox.com/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)\
[XtfConsoleControl](https://docs.xbox.com/zh-TW/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members.md)


## Related topics

- [IXtfConsoleControlClient (介面內容)](https://docs.xbox.com/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
- [XNetworkingSetConfigurationSetting](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/functions/xnetworkingsetconfigurationsetting.md)
- [GetConfigValue](https://docs.xbox.com/zh-TW/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigvalue.md)
- [XNetworkingQueryConfigurationSetting](https://docs.xbox.com/zh-TW/reference/networking/xnetworking/functions/xnetworkingqueryconfigurationsetting.md)
- [Set Title Data](https://docs.xbox.com/api-reference/title-wide-data-management/set-title-data.md)
