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_NdInitAsync</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13<a name="dwc__nd_8h_10f7fb2775c6aa081cdaadbc1247363d3"></a>
14<h1 align="left">DWC_NdInitAsync</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_NdInitAsync.html#dwc__nd_8h_10f7fb2775c6aa081cdaadbc1247363d3>DWC_NdInitAsync</a>(<a href=DWCNdCallback.html#dwc__nd_8h_13ab334b8de8158333fe68797a4031d04>DWCNdCallback</a> callback,
22                     const char *gamecd,
23                     const char *passwd);</CODE></PRE></dd>
24</dl>
25
26<h2>Arguments</h2>
27
28<TABLE border="1" width="100%">
29  <TBODY>
30
31    <TR>
32<TD width="13%"><EM><STRONG>callback</STRONG></EM></TD>
33<TD width="87%">Pointer to the callback function called in response to various types of notifications from the Download library. If a callback is unnecessary, specify <CODE>NULL</CODE>.</TD>
34    </TR>
35
36    <TR>
37<TD width="13%"><EM><STRONG>gamecd</STRONG></EM></TD>
38<TD width="87%">Pointer to the game name required to access Nintendo Wi-Fi Connection Download Server.</TD>
39    </TR>
40
41    <TR>
42<TD width="13%"><EM><STRONG>passwd</STRONG></EM></TD>
43<TD width="87%">Pointer to the password string required to access Nintendo Wi-Fi Connection Download Server.</TD>
44    </TR>
45
46  </TBODY>
47</TABLE>
48
49<h2>Return Values</h2>
50
51<TABLE border="1" width="100%">
52  <TBODY>
53
54    <TR>
55<TD width="13%"><EM><STRONG>TRUE</STRONG></EM></TD>
56<TD width="87%">Successful. The <a href=DWC_NdCleanupAsync.html><CODE>DWC_NdCleanupAsync</CODE></a> function must be called at termination.</TD>
57    </TR>
58
59    <TR>
60<TD width="13%"><EM><STRONG>FALSE</STRONG></EM></TD>
61<TD width="87%">Failed. Use the <a href=DWC_GetLastErrorEx.html#dwc__error_8h_118bd79f5d5151259c19c4e552e5e633b><code>DWC_GetLastErrorEx</code></a> function to obtain error information.</TD>
62    </TR>
63
64  </TBODY>
65</TABLE>
66
67<H2>Description</H2>
68<p>Starts the process of download library initialization.</p><p>Because HTTP communications are performed in the background during initialization, be sure that enough processing time is given to run threads that have lower priority than the main thread.<br>Two types of download servers are available: one for development and one for the final product. The download server is switched, along with the authentication server, by the <a href=DWC_Init.html><CODE>DWC_Init</CODE></a> function.</p><p>To obtain the information to be specified as the <CODE>gamecd</CODE> and <CODE>passwd</CODE> arguments, you must apply to Nintendo ahead of time.</p><p>Once this function is called and <CODE>TRUE</CODE> is returned, be sure to call the <a href=DWC_NdProcess.html><CODE>DWC_NdProcess</CODE></a> function about once per game frame to advance processing. Because the download library starts up when <CODE>TRUE</CODE> is returned, the <a href=DWC_NdCleanupAsync.html><CODE>DWC_NdCleanupAsync</CODE></a> function must be called even if an error occurs during asynchronous initialization processing.</b></p><p>The value returned by <a href=DWC_NdProcess.html#dwc__nd_8h_1b38515d259a11713e7552ee183b7e55e><CODE>DWC_NdProcess</CODE></a> allows you to determine when initialization has completed. If you specify <CODE>callback</CODE>, the specified callback function will be called when the initialization process completes.</p><p>This function calls the <CODE>NHTTPStartup</CODE> function internally. Avoid the overlapping use of NHTTP before and after the time interval between the call to this function and the time that the processes performed by <CODE><a href=DWC_NdCleanupAsync.html#dwc__nd_8h_1b5866639aee7fb3a9d693a1411625ee0>DWC_NdCleanupAsync</a></CODE> are completed.</p>
69
70<h2>See Also</h2>
71<p>
72
73<CODE><A href="DWC_Init.html">DWC_Init<BR></A></CODE>
74
75<CODE><A href="DWC_GetLastErrorEx.html">DWC_GetLastErrorEx<BR></A></CODE>
76
77<CODE><A href="DWC_NdProcess.html">DWC_NdProcess</A></CODE>
78
79</p>
80
81<H2>Revision History</H2>
82<DL>
83
84<DT><para>1.4.15</DT>
85<DD>Added <CODE>callback</CODE> to the arguments.</DD>
86
87<DT><para>1.4.12</DT>
88<DD>Added information specific to conflicts in NHTTP.</DD>
89
90<DT><para>1.4.7</DT>
91<DD>Added a description of usage.</DD>
92
93</DL>
94<hr><p>CONFIDENTIAL</p></body>
95</html>
96