gpRegisterCdKey

GameSpy SDK

gpRegisterCdKey

This function attempts to register a cdkey and associate it with the local profile.

GPResult gpRegisterCdKey(
GPConnection * connection,
const gsi_char cdkey[GP_CDKEY_LEN],
GPEnum blocking,
GPCallback callback,
void * param );
RoutineRequired HeaderDistribution
gpRegisterCdKey<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.
cdkey
[in] A CDKey to associate with the local profile..
blocking
[in] GP_BLOCKING or GP_NON_BLOCKING
callback
[in] A user supplied callback with an arg type of GPRegisterCdKeyResponseArg.
param
[in] Pointer to user-defined data. This value will be passed unmodified to the callback function.

Remarks

This function will only work if GP is connected. Note that only one CDKey can be associated with a single profile. Once a CDKey has been associated, it cannot be associated with any other profiles.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
gpRegisterCdKeygpRegisterCdKeyAgpRegisterCdKeyW

gpRegisterCdKeyW and gpRegisterCdKeyA are UNICODE and ANSI mapped versions of gpRegisterCdKey. The arguments of gpRegisterCdKeyA are ANSI strings; those of gpRegisterCdKeyW are wide-character strings.

Section Reference: Gamespy Presence SDK

See Also: GPRegisterCdKeyResponseArg