XtfGetCredentialServerName

Gets the server name part of the credentials stored at an index in an XtfNetworkCredentials object returned by XtfGetCredentialInfoList.

Syntax

HRESULT XtfGetCredentialServerName(
         XtfNetworkCredentials credentialInfo,
         UINT32 credentialIndex,
         PWSTR serverName,
         UINT32 *serverNameSize
)  

Parameters

credentialInfo
Type: XtfNetworkCredentials

[in] An XtfNetworkCredentials object created by calling XtfGetCredentialInfoList.

credentialIndex
Type: UINT32

[in] Index of the serverName in the credentialInfo object.

serverName
Type: PWSTR

[out] Server name at the given index in the credentialInfo object.

serverNameSize
Type: UINT32 *

[in, out] Length of serverName buffer in WCHAR.

Return value

Type: HRESULT

Returns S_OK if successful. Returns HRESULT_FROM_WIN32(ERROR_MORE_DATA) if serverName is not large enough. The required buffer length is returned in serverNameLength.

Remarks

Use XtfAddCredential to add credentials. Use XtfRemoveCredential to remove credentials. Use XtfGetCredentialInfoList, XtfGetCredentialInfoCount, XtfGetCredentialServerName, and XtfGetCredentialUserName to enumerate the current list of stored credentials. Use XtfCloseCredentialInfoList to free the XtfNetworkCredentials returned by XtfGetCredentialInfoList.

See XtfGetCredentialInfoList for an example of how to use this API.

Requirements

Header: xtfapi.h

Library: XtfApi.lib

Supported platforms: Windows (for Xbox console tools)

See also

Run from PC Deployment (NDA topic)Authorization required
XTF Transport Errors (NDA topic)Authorization required
Additional Xtf APIs