DWC_RnkInitialize

C Specification


#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. Therefore, when initializing with this function, the GHTTP Library is also initialized internally. Consequently, Ranking Library communication and GHTTP Library communication cannot be performed at the same time.

Call the DWC_RnkShutdown function as part of termination processing.

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

User data must contain a valid GS profile ID. An error will occur (DWC_RNK_ERROR_INIT_INVALID_USERDATA) with data that contains temporary login IDs that have never been used before.

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 secret key string for communications is issued for every game title and is unique to that game. The server environment is separate for each game, so no communication can be performed until Nintendo sets up the server specifically for your 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 accordance to the authentication server switching via 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 The 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 initialized data size
DWC_RNK_ERROR_INIT_INVALID_INITDATA Invalid initialized data
DWC_RNK_ERROR_INIT_INVALID_USERDATA Invalid user ID

See Also

DWC_RnkShutdown, DWC_SetAuthServer

Revision History

07/24/2006 Added an explanation about the development and production servers
07/21/2006 Standardized some phrases
04/14/2006 Initial version.


CONFIDENTIAL