> ## 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](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) によって返された `XtfNetworkCredentials` オブジェクトに格納されている資格情報の数を取得します。

<a id="syntaxSection" />

## Syntax

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

<a id="parametersSection" />

### Parameters

*credentialInfo*<br />型: XtfNetworkCredentials

\[in] [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) を呼び出して作成された `XtfNetworkCredentials` オブジェクトです。

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

\[out] *credentialInfo* に格納されている資格情報の数です。

<a id="retvalSection" />

### Return value

型: HRESULT

成功した場合は `S_OK` を返します。それ以外の場合は、HRESULT エラー コードを返します。

<a id="remarksSection" />

## Remarks

この関数を使用して、[XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) 関数から返された `XtfNetworkCredentials` オブジェクトに格納されている資格情報の数を取得します。コンソール上で現在保存されている資格情報の一覧を列挙するには、この関数を `XtfGetCredentialInfoList`、[XtfGetCredentialServerName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialtargetname-xtfapi-xbox-windows-m)、[XtfGetCredentialUserName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialusername-xtfapi-xbox-windows-m) 関数と組み合わせて使用します。また、資格情報の追加には [XtfAddCredential](/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m)、資格情報の削除には [XtfRemoveCredential](/reference/tools/xtf/xtfapi/functions/xtfremovecredential-xtfapi-xbox-windows-m) を使用できます。

処理が完了したら、[XtfCloseCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m) を使用して、`XtfGetCredentialInfoList` から返された `XtfNetworkCredentials` オブジェクトを解放します。

保存済み資格情報の管理と列挙を示す例については、[XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m) を参照してください。

<a id="requirementsSection" />

## Requirements

**ヘッダー:** xtfapi.h

**ライブラリ:** XtfApi.lib

**サポートされているプラットフォーム:** Windows (XBOX コンソール ツール用)

<a id="seealsoSection" />

## See also

[Run from PC Deployment (NDA topic)](/home/setup-install/concepts/deployment)<br />[XTF Transport Errors (NDA topic)](/tools/tools-console/commandlinetools/xtf-transport-errors)<br />[Additional Xtf APIs](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

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