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

# XtfGetCredentialUserName

> XtfGetCredentialUserName

# XtfGetCredentialUserName

[XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m)가 반환한 XtfNetworkCredentials 개체의 지정된 인덱스에 저장된 자격 증명의 사용자 이름 부분을 가져옵니다.

<a id="syntaxSection" />

## 구문

```cpp theme={null}
HRESULT XtfGetCredentialUserName(
         XtfNetworkCredentials credentialInfo,
         UINT32 credentialIndex,
         PWSTR userName,
         UINT32 *userNameLength
)  
```

<a id="ID4EK" />

### 매개 변수

*credentialInfo*<br />형식: XtfNetworkCredentials

\[in] [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m)를 호출하여 생성한 XtfNetworkCredentials 개체입니다.

*credentialIndex*<br />형식: UINT32

\[in] **credentialInfo** 개체 내에서 **userName**의 인덱스입니다.

*userName*<br />형식: PWSTR

\[out] **credentialInfo** 개체에서 지정한 인덱스에 있는 사용자 이름입니다.

*userNameLength*<br />형식: UINT32 \*

\[in, out] WCHAR 단위의 **userName** 버퍼 길이입니다.

<a id="ID4ER" />

### 반환값

형식: HRESULT

성공하면 **S\_OK**를 반환합니다. **userName**이 충분히 크지 않은 경우 HRESULT\_FROM\_WIN32(ERROR\_MORE\_DATA)를 반환합니다. 필요한 버퍼 길이는 **userNameLength**에 반환됩니다.

<a id="remarks" />

## 설명

[XtfAddCredential](/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m)을 사용하여 자격 증명을 추가합니다. [XtfRemoveCredential](/reference/tools/xtf/xtfapi/functions/xtfremovecredential-xtfapi-xbox-windows-m)을 사용하여 자격 증명을 제거합니다. [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m), [XtfGetCredentialInfoCount](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfocount-xtfapi-xbox-windows-m), [XtfGetCredentialServerName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialtargetname-xtfapi-xbox-windows-m), [XtfGetCredentialUserName](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialusername-xtfapi-xbox-windows-m)을 사용하여 저장된 자격 증명의 현재 목록을 열거합니다. [XtfCloseCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m)를 사용하여 [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m)가 반환한 XtfNetworkCredentials를 해제합니다.

이 API의 사용 예제는 [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m)를 참조하세요.

## 요구 사항

**헤더:** xtfapi.h

**라이브러리:** XtfApi.lib

**지원 플랫폼:** Windows(XBOX 콘솔 도구용)

## 참고 항목

[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

- [XtfGetCredentialInfoList](/ko/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m.md)
- [XtfGetCredentialServerName](/ko/reference/tools/xtf/xtfapi/functions/xtfgetcredentialtargetname-xtfapi-xbox-windows-m.md)
- [XtfRemoveCredential](/ko/reference/tools/xtf/xtfapi/functions/xtfremovecredential-xtfapi-xbox-windows-m.md)
- [XtfAddCredential](/ko/reference/tools/xtf/xtfapi/functions/xtfaddcredential-xtfapi-xbox-windows-m.md)
- [XtfCloseCredentialInfoList](/ko/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m.md)
