gpInvitePlayer

GameSpy SDK

gpInvitePlayer

This function invites a player to play a certain game.

GPResult gpInvitePlayer(
GPConnection * connection,
GPProfile profile,
int productID,
const gsi_char location[GP_LOCATION_STRING_LEN] );
RoutineRequired HeaderDistribution
gpInvitePlayer<gp.h>SDKZIP

Return Value

This function returns GP_NO_ERROR upon success. Otherwise a valid GPResult is returned.

Parameters

connection
[in] A GP connection interface.
profile
[in] The profile ID of the player to invite.
productID
[in] The product ID of the game to invite the player to.
location
[in] A message to send along with the invite. See remarks.

Remarks

This function is used to invite another profile to join the local profile in a game’s title room. The remote profile will receive a GP_RECV_GAME_INVITE callback.

gpInvitePlayer may now take an optional text message to be sent along with the invite. This usually contains the server IP and other connecting information. This parameter may be NULL. The max length for the location info is 255 characters. When compiling in Unicode mode, the location will be converted to ASCII.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
gpInvitePlayergpInvitePlayerAgpInvitePlayerW

gpInvitePlayerW and gpInvitePlayerA are UNICODE and ANSI mapped versions of gpInvitePlayer. The arguments of gpInvitePlayerA are ANSI strings; those of gpInvitePlayerW are wide-character strings.

Section Reference: Gamespy Presence SDK