1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
8<title>DWC_LoginAsync</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13<a name="dwc__main_8h_1ac1f7f301938afe8408be88dfa65f217"></a>
14<h1 align="left">DWC_LoginAsync</h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;dwc.h&gt;</CODE><BR>
20  <BR>
21  <PRE><CODE>BOOL <a href=DWC_LoginAsync.html#dwc__main_8h_1ac1f7f301938afe8408be88dfa65f217>DWC_LoginAsync</a>(const u16 *ingamesn,
22                    const char *reserved,
23                    <a href=DWCLoginCallback.html#dwc__login_8h_1420f25bb93cca6fdc1707b1626d8ce42>DWCLoginCallback</a> callback,
24                    void *param);</CODE></PRE></dd>
25</dl>
26
27<h2>Arguments</h2>
28
29<TABLE border="1" width="100%">
30  <TBODY>
31
32    <TR>
33<TD width="13%"><EM><STRONG>ingamesn</STRONG></EM></TD>
34<TD width="87%">Screen name sent to the authentication server.<ul><li>Use Unicode (big endian UTF16) for the character code.<br>If you are using a different character code, be sure to convert to Unicode.<br></li><li>If the screen name contains a special character not found in Unicode or the IPL font, replace it with a space.<br></li><li>The terminal character should be &quot;0x0000&quot; in u16.<br></li><li>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. <br></li></ul></TD>
35    </TR>
36
37    <TR>
38<TD width="13%"><EM><STRONG>reserved</STRONG></EM></TD>
39<TD width="87%">Normally, specify NULL. Retained for compatibility with past versions.</TD>
40    </TR>
41
42    <TR>
43<TD width="13%"><EM><STRONG>callback</STRONG></EM></TD>
44<TD width="87%">The pointer to the login completion callback function.</TD>
45    </TR>
46
47    <TR>
48<TD width="13%"><EM><STRONG>param</STRONG></EM></TD>
49<TD width="87%">Parameter for the login completion callback.</TD>
50    </TR>
51
52  </TBODY>
53</TABLE>
54
55<h2>Return Values</h2>
56
57<TABLE border="1" width="100%">
58  <TBODY>
59
60    <TR>
61<TD width="13%"><EM><STRONG>TRUE</STRONG></EM></TD>
62<TD width="87%">The login process starts. The results are indicated via the callback function.</TD>
63    </TR>
64
65    <TR>
66<TD width="13%"><EM><STRONG>FALSE</STRONG></EM></TD>
67<TD width="87%">This is not a good state to call this function, or a NULL has been designated in the <CODE>ingamesn</CODE> argument. The callback function will not be called.</TD>
68    </TR>
69
70  </TBODY>
71</TABLE>
72
73<H2>Description</H2>
74<p>The application checks if the GameSpy server can be used, performs remote authentication, and connects to Nintendo Wi-Fi Connection.</p><p>To call this function, the <A href="DWC_InitFriendsMatch.html"><CODE>DWC_InitFriendsMatch</CODE></a> 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.</p><p>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.</p><p>Continue to call the <A href="DWC_ProcessFriendsMatch.html"><CODE>DWC_ProcessFriendsMatch</CODE></a> function after this function is called and the login process will proceed. When the process is complete, the login completion callback will be called.</p><p>Depending on the condition of the network connection, the process might be blocked and not return from the function for some time.</p><p>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 <A href="DWC_GetIngamesnCheckResult.html"><CODE>DWC_GetIngamesnCheckResult</CODE></a> function after successfully connecting to the Wi-Fi connection.</p><p>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.</p><p>If the FriendsMatch library will not be used, call the <A href="DWC_NasLoginAsync.html"><CODE>DWC_NASLoginAsync</CODE></A> function instead of this function.</p><p>This function calls the <CODE>NHTTPStartup</CODE> 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.</p>
75
76<h2>See Also</h2>
77<p>
78
79<CODE><A href="DWC_NasLoginAsync.html">DWC_NasLoginAsync</A></CODE>
80
81</p>
82
83<H2>Revision History</H2>
84<DL>
85
86<DT><para>1.4.12</DT>
87<DD>Added information specific to conflicts in NHTTP.</DD>
88
89<DT><para>1.4.10</DT>
90<DD>Added a section concerning details of connecting to the network and a section concerning creating a DNS cache.</DD>
91
92</DL>
93<hr><p>CONFIDENTIAL</p></body>
94</html>
95