> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IXtfConsoleControlClient::GetConfigValue

> IXtfConsoleControlClient::GetConfigValue

# IXtfConsoleControlClient::GetConfigValue

Gets the value of the specified configuration setting.

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### Parameters

*pszKey*\
Type: LPCWSTR

A pointer to the name of the configuration setting to get the value of.

*pszValue*\
Type: LPBSTR

The pointer that receives the value of the configuration setting specified in *pszKey*.

<a id="retvalSection" />

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an HRESULT error code.

<a id="remarksSection" />

## Remarks

This function returns the value of a single configuration setting from the current development console. If `pszKey` is set to the pointer of a string that contains a valid name (or key) of a configuration setting, the function returns `S_OK` and sets `pszValue` to the pointer of a string that contains the value of that configuration setting. Otherwise, the function returns an error.

If you want to enumerate each configuration setting on the current console, you can use the [IXtfConsoleControlClient::GetConfigSettings](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigsettings) function to iterate over the configuration settings and invoke an [IXtfConfigSettingsCallback::OnFoundSetting](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConfigSettingsCallback/methods/ixtfconfigsettingscallback_onfoundsetting) callback function, implemented in your app, for each configuration setting. You can also use the [IXtfConsoleControlClient::GetAllSettings](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getallsettings) method to return an array of `XTFCONFIGSETTING` structures for all configuration settings on the current development console.

For more information about accessing configuration settings using XBOX Tools Framework (XTF), see [Configuration (xbconfig.exe) (NDA topic)](/tools/tools-console/commandlinetools/xbconfig).

<a id="remarks_output" />

### Handling LPBSTR pointers

For more information about handling LPBSTR pointers returned by this function, see [Allocating and Releasing Memory for a BSTR](https://learn.microsoft.com/cpp/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr?view=vs-2019).

<a id="requirementsSection" />

## Requirements

**Header:** xtfconsolecontrol.h

**Library:** xtfconsolecontrol.lib

**Supported platforms:** Windows (for XBOX console tools)

<a id="seealsoSection" />

## See also

[IXtfConsoleControlClient](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient)\
[XtfConsoleControl](/reference/tools/xtf/xtfconsolecontrol/xtfconsolecontrol_members)


## Related topics

- [IXtfConsoleControlClient::SetConfigValue](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_setconfigvalue.md)
- [IXtfConsoleControlClient](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
- [IXtfConsoleControlClient::GetConfigSettings](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getconfigsettings.md)
- [IXtfConsoleControlClient::GetAllSettings](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getallsettings.md)
- [IXtfConsoleControlClient::GetRunningProcesses](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getrunningprocesses.md)
