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

# XtfGetCredentialInfoCount

> XtfGetCredentialInfoCount

# XtfGetCredentialInfoCount

取得 [XtfGetCredentialInfoList](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) 所傳回之 `XtfNetworkCredentials` 物件中儲存的認證數目。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
HRESULT XtfGetCredentialInfoCount(
         XtfNetworkCredentials credentialInfo,
         UINT32* count
)  
```

<a id="parametersSection" />

### 參數

*credentialInfo*<br />類型: XtfNetworkCredentials

\[in] 呼叫 [XtfGetCredentialInfoList](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) 所建立的 `XtfNetworkCredentials` 物件。

*count*<br />類型: UINT32\*

\[out] *credentialInfo* 中儲存的認證數目。

<a id="retvalSection" />

### 傳回值

類型: HRESULT

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

<a id="remarksSection" />

## 備註

使用此函式可取得 [XtfGetCredentialInfoList](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) 函式所傳回之 `XtfNetworkCredentials` 物件中儲存的認證數目。請將此函式與 `XtfGetCredentialInfoList`、[XtfGetCredentialServerName](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialtargetname-xtfapi-xbox-windows-m) 和 [XtfGetCredentialUserName](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialusername-xtfapi-xbox-windows-m) 函式搭配使用，以列舉主機上目前已儲存的認證清單。您也可以使用 [XtfAddCredential](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m) 新增認證，以及使用 [XtfRemoveCredential](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfremovecredential-xtfapi-xbox-windows-m) 移除認證。

完成後，使用 [XtfCloseCredentialInfoList](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m) 釋放 `XtfGetCredentialInfoList` 所傳回的 `XtfNetworkCredentials` 物件。

如需示範如何管理和列舉已儲存認證的範例，請參閱 [XtfGetCredentialInfoList](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m)。

<a id="requirementsSection" />

## 需求

**標頭:** xtfapi.h

**程式庫:** XtfApi.lib

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

<a id="seealsoSection" />

## 另請參閱

[從 PC 執行部署 (NDA 主題)](/zh-TW/home/setup-install/concepts/deployment)<br />[XTF 傳輸錯誤 (NDA 主題)](/zh-TW/tools/tools-console/commandlinetools/xtf-transport-errors)<br />[其他 Xtf API](/zh-TW/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfRemoveCredential](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfremovecredential-xtfapi-xbox-windows-m.md)
- [XtfAddCredential](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m.md)
- [XtfCloseCredentialInfoList](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m.md)
- [XtfGetCredentialServerName](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialtargetname-xtfapi-xbox-windows-m.md)
- [XtfGetCredentialUserName](/zh-TW/reference/tools/xtf/xtfapi/functions/xtfgetcredentialusername-xtfapi-xbox-windows-m.md)
