DWC_LoginAsync

Syntax

#include <dwc.h>
BOOL DWC_LoginAsync(const u16 *ingamesn,
                    const char *reserved,
                    DWCLoginCallback callback,
                    void *param);

Arguments

ingamesn Screen name to be sent to the authentication server.
  • Use Unicode (little-endian UTF16) for the character code.
    Be sure to convert to Unicode when using another type of character code.
  • Substitute a space in the screen name for any unique characters that are not in Unicode or the IPL font.
  • The terminator must be 0x0000 in u16.
  • If a string of 26 or more characters (excluding the null terminator) has been specified, only the first 25 characters are sent to the authentication server.
  • If there is only communication with friends, or if a separate illegal string check will be made (for checking multiple strings simultaneously), you may decide not to use this function to perform an illegal string check. In that case, specify an empty string.
reserved Normally, specify NULL. Retained for compatibility with past versions.
callback The pointer to the login completion callback function.
param Parameter for the login completion callback.

Return Values

TRUE The login process starts. The results are indicated via the callback function.
FALSE This is not a good time to call this function, or NULL has been designated in the ingamesn argument.
The callback function is invoked only when not connected to the Internet.

Description

The application checks if the GameSpy server can be used, performs remote authentication, and connects to Nintendo Wi-Fi Connection.

To call this function, the DWC_InitFriendsMatch function must have completed FriendsMatch library initialization after connecting to the Internet.

Continue to call the DWC_ProcessFriendsMatch function after this function is called, and the login process will advance. When login is complete, the login completion callback is called.

Depending on the condition of the network connection, the process might be blocked and not return from the function for some time.

The authentication server checks to see if the in-game screen name (the name the player is using during the game) is inappropriate in the Wi-Fi Connection. Get the results of that check with the DWC_GetIngamesnCheckResult function after successfully connecting to the Wi-Fi connection. See the DWC_CheckProfanityAsync function for details on checking for illegal strings.

Note: An error communicating with the Authentication server (error code 20109) is generated if the maker code is undefined in the ROM registry data.

If you will not use the FriendsMatch library, call the DWC_NasLoginAsync function in place of this function.

This function calls the NHTTPStartup function internally. Avoid the overlapping use of NHTTP before and after the time interval between when this function is called and login is completed.

See Also

DWC_NasLoginAsync DWC_CheckProfanityAsync

Revision History

5.4
Revised the description of the FALSE return value when a callback function is invoked.
5.3 patch 3
Changed screen name character codes sent to the authentication server to little-endian UTF16.
5.1
Deleted information that was mistakenly included (the SO library and DNS cache).
5.1 PR2
Added a description of specifying an empty string for the argument ingamesn.

For the change log prior to 5.1 PR2, click here.  


CONFIDENTIAL