DWC_LoginAsync

Syntax

#include <dwc.h>

BOOL DWC_LoginAsync(const u16 *ingamesn,
                    const char *reserved,
                    DWCLoginCallback callback,
                    void *param);

Arguments

ingamesn Screen name sent to the authentication server.
  • Use Unicode (big endian UTF16) for the character code.
    If you are using a different character code, be sure to convert to Unicode.
  • If the screen name contains a special character not found in Unicode or the IPL font, replace it with a space.
  • The terminal character should be "0x0000" in u16.
  • If a string equal to or greater than 26 characters (excluding termination) has been specified, only the first 25 characters from the beginning will be sent to the authentication server.
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 state to call this function, or a NULL has been designated in the ingamesn argument. The callback function will not be called.

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. For details about the network connection, see the documentation and demo programs for the SO library.

When this function is called, a DNS cache is created to speed up subsequent communications by the library. Processing could be blocked for a long time if there is a problem with communication with the DNS server.

Continue to call the DWC_ProcessFriendsMatch function after this function is called and the login process will proceed. When the process is complete, the login completion callback will be 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 on the Wi-Fi connection. Get the results of that check with the DWC_GetIngamesnCheckResult function after successfully connecting to the Wi-Fi connection.

Be aware that an error communicating with the Authentication server (error code 20109) will be generated if the maker code is undefined in the data registered in ROM.

If the FriendsMatch library will not be used, call the DWC_NASLoginAsync function instead 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 log-in is completed.

See Also

DWC_NasLoginAsync

Revision History

1.4.12
Added information specific to conflicts in NHTTP.
1.4.10
Added a section concerning details of connecting to the network and a section concerning creating a DNS cache.

CONFIDENTIAL