DWC_RnkInitialize

Syntax


#include <dwc.h>

DWCRnkError DWC_RnkInitialize( const char*           initdata,
                               const DWCUserData*    userdata );
				

Description

Initializes the Ranking library.

The Ranking Library uses the GHTTP Library internally to perform communication. Consequently, when the library is initialized using this function, the GHTTP Library is also initialized internally. Therefore, Ranking Library communication and GHTTP Library communication cannot be performed at the same time.

Call the DWC_RnkShutdown function as part of termination processing.

This function will fail if the library is already initialized or if the initial data is invalid.

User data must contain a valid GS profile ID. The DWC_RNK_ERROR_INIT_INVALID_USERDATA error will occur if the data includes a provisional login ID that has never been used to log in, or if the data's Dirty flag has been set.

If the process has been interrupted due to an error or a cancellation, you will need to call DWC_RnkShutdown to end the process, then call this function again.

A private key string used for communications is issued for each game title. The server identifies the game title based on this private key. The ranking library cannot be used until Nintendo issues a private key string for the game title and the server is set up for the game.

The general-purpose ranking feature uses the GameSpy server. While there are two server types available, one for development and one for the final production version, switching between them is performed according to the authentication server's switching through the DWC_SetAuthServer function.

The databases for the development server and the production server are separate, so both of their rankings are configured differently.

Arguments

initdata Secret key string for communications.
userdata User data.

Return Values

DWC_RNK_SUCCESS Succeeded.
DWC_RNK_ERROR_INIT_ALREADYINITIALIZED Initialized.
DWC_RNK_ERROR_INIT_INVALID_INITDATASIZE Invalid initial data size.
DWC_RNK_ERROR_INIT_INVALID_INITDATA Invalid initial data.
DWC_RNK_ERROR_INIT_INVALID_USERDATA Invalid user ID.

See Also

DWC_RnkShutdown
DWC_SetAuthServer

Revision History

2007/09/26 Described the Dirty flag.
2006/07/24 Described the development and production servers.
2006/07/21 Standardized some phrases.
2006/04/14 Initial version.


CONFIDENTIAL