peerGetGlobalWatchKey

GameSpy SDK

peerGetGlobalWatchKey

Returns the cached value of a players watch key.

const gsi_char * peerGetGlobalWatchKey(
PEER peer,
const gsi_char * nick,
const gsi_char * key );
RoutineRequired HeaderDistribution
peerGetGlobalWatchKey<peer.h>SDKZIP

Return Value

The watch key’s value, or NULL if the watch key is unknown.  (Empty string "" is a legal value).

Parameters

peer
[in] Initialized peer object.
nick
[in] The nickname of the player.
key
[in] The name of the key.

Remarks

The peerGetGlobalWatchKey function may be used to retrieve the cached value of a global watch key.  If the key value is not known or has not been received this function will return NULL.  Please note that an empty string "" is valid key value. If the key is just empty (or was never set), an empty string will be returned.
The key being requested must have previously been set as a global watch key, with peerSetGlobalWatchKey(), for a room that the player and the local player have in common. This will fail if no title is set.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
peerGetGlobalWatchKeypeerGetGlobalWatchKeyApeerGetGlobalWatchKeyW

peerGetGlobalWatchKeyW and peerGetGlobalWatchKeyA are UNICODE and ANSI mapped versions of peerGetGlobalWatchKey. The arguments of peerGetGlobalWatchKeyA are ANSI strings; those of peerGetGlobalWatchKeyW are wide-character strings.

Section Reference: Gamespy Peer SDK