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

# XTFCONSOLEDATA 結構

> XTFCONSOLEDATA 結構

# XTFCONSOLEDATA 結構

包含 [IXtfConsoleManager](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t) 執行個體中開發主機的相關資訊。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
typedef struct _XTFCONSOLEDATA {
    BSTR bstrAlias;
    BSTR bstrAddress;
} XTFCONSOLEDATA, *PXTFCONSOLEDATA;  
```

<a id="membersSection" />

### 成員

*bstrAlias*\
主機的名稱。

*bstrAddress*\
主機的工具 IP 位址。

<a id="remarksSection" />

## 備註

此結構包含 [IXtfConsoleManager](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t) 執行個體中開發主機的相關資訊，包括別名和 IP 位址。

當 [IXtfConsoleManager](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t) 執行個體叫用 **IXtfConsoleManagerCallback** 和 **IXtfEnumerateConsolesCallback** 介面的任何回呼方法時，這些介面會使用 `XTFCONSOLEDATA` 結構來傳遞開發主機的相關資訊。同樣地，[IXtfConsoleManager](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t) 介面會在 [GetConsole](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/getconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m) 和 [GetDefaultConsole](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/getdefaultconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m) 方法中使用此結構，以提供開發主機的相關資訊。

如需查詢開發主機的詳細資訊，請參閱[連線 (xbconnect.exe) (NDA 主題)](/zh-TW/tools/tools-console/commandlinetools/xbconnect)。

<a id="remarks_output" />

### 處理 BSTR 指標

如需處理此結構中所傳回之 BSTR 指標的詳細資訊，請參閱[配置和釋放 BSTR 的記憶體](https://learn.microsoft.com/cpp/atl-mfc-shared/allocating-and-releasing-memory-for-a-bstr?view=vs-2019)。

<a id="requirementsSection" />

## 需求

**標頭：** xtfconsolemanager.h

**程式庫：** xtfconsolemanager.lib

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

<a id="seealsoSection" />

## 另請參閱

[IXtfConsoleManager 介面](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-t)\
[XtfConsoleManager](/zh-TW/reference/tools/xtf/xtfconsolemanager/xtfconsolemanager-xbox-microsoft-n)


## Related topics

- [IXtfConsoleManagerCallback::OnAddConsole 方法](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onaddconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox-microsoft.md)
- [IXtfConsoleManagerCallback::OnRemoveConsole 方法](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onremoveconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox-microso.md)
- [IXtfEnumerateConsolesCallback::OnConsoleFound 方法](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfEnumerateConsolesCallback/methods/onconsolefound-ixtfenumerateconsolescallback-xtfconsolemanager-xbox-mi.md)
- [IXtfConsoleManagerCallback::OnChangedDefaultConsole 方法](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManagerCallback/methods/onchangeddefaultconsole-ixtfconsolemanagercallback-xtfconsolemanager-xbox.md)
- [IXtfConsoleManager::GetDefaultConsole 方法](/zh-TW/reference/tools/xtf/xtfconsolemanager/classes/IXtfConsoleManager/methods/getdefaultconsole-ixtfconsolemanager-xtfconsolemanager-xbox-microsoft-m.md)
