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

# XtfAddCredential

> XtfAddCredential

# XtfAddCredential

## Syntax

```cpp theme={null}
HRESULT XtfAddCredential(
         LPCWSTR address,
         LPCWSTR targetName,
         LPCWSTR userName,
         LPCWSTR password
)  
```

### Parameters

*address*<br />Type: LPCWSTR

\[in] 콘솔의 주소입니다.

*targetName*<br />Type: LPCWSTR

\[in] 대상 서버 또는 공유 이름입니다.

*userName*<br />Type: LPCWSTR

\[in] 사용할 사용자 이름입니다. 형식은 `domain\user`입니다.

*password*<br />Type: LPCWSTR

\[in] 사용자의 암호입니다.

### Return value

Type: HRESULT

반환 값 **S\_OK**는 함수가 성공했음을 나타냅니다. 다른 값은 예기치 않은 오류가 발생했음을 나타냅니다.

## 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)을 사용합니다. [XtfGetCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfgetcredentialinfolist-xtfapi-xbox-windows-m)가 반환한 XtfNetworkCredentials를 해제하려면 [XtfCloseCredentialInfoList](/reference/tools/xtf/xtfapi/functions/xtfclosecredentialinfo-xtfapi-xbox-windows-m)를 사용합니다.

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

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

**Supported platforms:** Windows(XBOX 콘솔 도구용)

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

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