Share via


IXtfUserClient::AddSponsoredUser

Adds a guest user.

Syntax

public:
HRESULT AddSponsoredUser(
         UINT32 *pUserId
)  

Parameters

pUserId
Type: UINT32 *

On successful completion, points to the user ID of the guest user.

Return value

Type: HRESULT

HRESULT success or error code.

Remarks

Guest users, also known as sponsored guests, are associated with an account that is already signed in. When your code calls this method, the system uses the first signed-in user in the list as the sponsor and continues to use that user for all subsequent sponsored users. If the selected user signs out, all sponsored users are signed out at that time.

Note

Unlike the UI used to add a sponsored user, this method does not have access to the Xbox Live privacy setting and online safety settings when it makes the selection.

To add a non-guest user, use AddUser.

For more information about guest users, see Guest Users Overview.

Requirements

Header: xtfuser.h

Library: xtfuser.lib

Supported platforms: Windows (for Xbox console tools)

See also

IXtfUserClient interface