gpNewUser
This function creates a new user account and a profile in that account. Unlike gpConnectNewUser, gpNewUser does not login with the new account. The local user does not need to be connected to use this function.
- GPResult gpNewUser(
- GPConnection * connection,
- const gsi_char nick[GP_NICK_LEN],
- const gsi_char uniquenick[GP_UNIQUENICK_LEN],
- const gsi_char email[GP_EMAIL_LEN],
- const gsi_char password[GP_PASSWORD_LEN],
- const gsi_char cdkey[GP_CDKEY_LEN],
- GPEnum blocking,
- GPCallback callback,
- void * param );
Routine | Required Header | Distribution |
---|---|---|
gpNewUser | <gp.h> | SDKZIP |
Return Value
This function returns GP_NO_ERROR upon success. Otherwise a valid GPResult is returned.
Parameters
- connection
- [in] The connection on which to create the new user.
- nick
- [in] The desired nickname for the initial profile of the new account.
- uniquenick
- [in] The desired uniquenick for the initial profile of the new account.
- [in] The desired e-mail for the initial profile of the new account.
- password
- [in] The desired password for the initial profile of the new account.
- cdkey
- [in] An optional CDKey to associate with the uniquenick.
- blocking
- [in] GP_BLOCKING or GP_NON_BLOCKING
- callback
- [in] User supplied callback function with an arg type of GPNewUserResponseArg.
- param
- [in] Pointer to user defined data. This value will be passed unmodified to the callback function.
Remarks
This function creates a new user and profile. The nick, email, and password are required parameters, uniquenick and cdkey are optional. This function is similar to gpConnectNewUser, however it does not connect the new user. You do not need to be connected to use this function.
When the new user is created, the callback will be called.
Unicode Mappings
Routine | GSI_UNICODE Not Defined | GSI_UNICODE Defined |
---|---|---|
gpNewUser | gpNewUserA | gpNewUserW |
gpNewUserW and gpNewUserA are UNICODE and ANSI mapped versions of gpNewUser. The arguments of gpNewUserA are ANSI strings; those of gpNewUserW are wide-character strings.
Section Reference: Gamespy Presence SDK
See Also: GPNewUserResponseArg