gpNewProfile

GameSpy SDK

gpNewProfile

This function creates a new profile for the local user.

GPResult gpNewProfile(
GPConnection * connection,
const gsi_char nick[GP_NICK_LEN],
GPEnum replace,
GPEnum blocking,
GPCallback callback,
void * param );
RoutineRequired HeaderDistribution
gpNewProfile<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.
nick
[in] The new profile nickname.
replace
[in] Replacement option. (See remarks.)
blocking
[in] GP_BLOCKING or GP_NON_BLOCKING
callback
[in] A user-supplied callback with an arg type of GPNewProfileResponseArg.
param
[in] Pointer to user defined data. This value will be passed unmodified to the callback function.

Remarks

This function creates a new profile for the local user. This function does not make the new profile the current profile. To switch to the newly created profile, the user must disconnect and then connect with the new nickname.
If the nick for the new profile is the same as the nick for an existing profile, an error will be generated, unless replace is GP_REPLACE. An application should use GP_DONT_REPLACE by default. If an error with the error code of GP_NEWPROFILE_BAD_NICK is received, this means that a profile with the provided nickname already exists. The application should at this point ask the user if he wants to replace the old profile. If the user does want to replace the old profile, gpNewProfile should be called again with replace set to GP_REPLACE.
When the new profile is created, the callback will be called.

Unicode Mappings

RoutineGSI_UNICODE Not DefinedGSI_UNICODE Defined
gpNewProfilegpNewProfileAgpNewProfileW

gpNewProfileW and gpNewProfileA are UNICODE and ANSI mapped versions of gpNewProfile. The arguments of gpNewProfileA are ANSI strings; those of gpNewProfileW are wide-character strings.

Section Reference: Gamespy Presence SDK

See Also: GPNewProfileResponseArg