XblMultiplayerActivitySendInvitesAsync

Sends invites to Xbox user IDs to join the caller's current activity.

Syntax

HRESULT XblMultiplayerActivitySendInvitesAsync(  
         XblContextHandle xblContext,  
         const uint64_t* xuids,  
         size_t xuidsCount,  
         bool allowCrossPlatformJoin,  
         const char* connectionString,  
         XAsyncBlock* async  
)  

Parameters

xblContext   _In_
Type: XblContextHandle

Xbox Live context for the local user.

xuids   _In_
Type: uint64_t*

List of Xbox user IDs to invite.

xuidsCount   _In_
Type: size_t

Size of the xuids array.

allowCrossPlatformJoin   _In_
Type: bool

If the title is configured for cross-platform invites, setting this parameter to true sends an invite to all platform endpoints that the title supports. If set to false, the invite is sent to the sender's platform only. If cross-platform invites are not configured, the invite is always sent to the sender's platform only.

connectionString   _In_opt_z_
Type: char*

(Optional) Connection string that the peer uses to join the game.

async   _In_
Type: XAsyncBlock*

The XAsyncBlock for this operation.

Return value

Type: HRESULT

HRESULT return code for this API operation.

Remarks

To get the result of the asynchronous operation, call XAsyncGetStatus inside the XAsyncBlock callback or after XAsyncBlock is complete.

To see how this function is used, see "Sending invites" in the Invites section of Example code for Multiplayer Activity.

For more information about multiplayer activities, see Activities.

REST Call

Calls POST /titles/{titleId}/invites

Requirements

Header: multiplayer_activity_c.h

Library: Microsoft.Xbox.Services.141.GSDK.C.lib

See also

multiplayer_activity_c