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_CreateFriendKeyLegacy</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13<a name="dwc__account_8h_1daacffcbbb3a2371dabd1bd4b1a1a84a"></a>
14<h1 align="left">DWC_CreateFriendKeyLegacy</h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;dwc.h&gt;</CODE><BR>
20  <BR>
21  <PRE><CODE>u64 <a href=DWC_CreateFriendKeyLegacy.html#dwc__account_8h_1daacffcbbb3a2371dabd1bd4b1a1a84a>DWC_CreateFriendKeyLegacy</a>(const DWCUserData *userdata);</CODE></PRE></dd>
22</dl>
23
24<h2>Arguments</h2>
25
26<TABLE border="1" width="100%">
27  <TBODY>
28
29    <TR>
30<TD width="13%"><EM><STRONG>userdata</STRONG></EM></TD>
31<TD width="87%">Pointer to the <CODE>DWCUserData</CODE> structure that stores user data.</TD>
32    </TR>
33
34  </TBODY>
35</TABLE>
36
37<h2>Return Values</h2>
38
39<TABLE border="1" width="100%">
40  <TBODY>
41
42    <TR>
43<TD width="13%"><EM><STRONG>Positive value</STRONG></EM></TD>
44<TD width="87%">Friend code.</TD>
45    </TR>
46
47    <TR>
48      <TD width="13%"><EM><STRONG>0</STRONG></EM></TD>
49<TD width="87%">Failed because the profile has not been obtained.</TD>
50    </TR>
51
52  </TBODY>
53</TABLE>
54
55<H2>Description</H2>
56<p>Generates the friend code (from user data) to be exchanged with friends. Display the friend registration key acquired with this function as a 12-digit, base 10 numeric value. In friend registration, create friend data from the friend registration key entered by the user with the <CODE><A href="DWC_CreateFriendKeyToken.html">DWC_CreateFriendKeyToken</A></CODE> function, then add this created friend data to the friend roster.</p><p>Furthermore, assume that friend codes may sometimes be entered incorrectly. Therefore, create an interface that allows users to re-enter the friend code until the friend relationship is established.</p><p>If the Nintendo Wi-Fi Connection has never been used, a friend code cannot be created. Thus, either set up an interface to create a code after making a connection, or display a message with appropriate instructions.</p><p>In RVLDWC1.4.15, changed the algorithm for generating friend codes. Use the <a href=DWC_CreateFriendKey.html#dwc__account_8h_1643a6e9b0ada98985feebc003af5cac3><CODE>DWC_CreateFriendKey</CODE></a> function unless you have a specific reason not to; for example, because you are using a localized version that creates friend codes with the old algorithm.</p>
57
58<h2>See Also</h2>
59<p>
60
61  <CODE><A href="DWC_CreateFriendKey.html">DWC_CreateFriendKey</A></CODE>
62
63  <CODE><A href="DWC_CheckFriendKeyLegacy.html">DWC_CheckFriendKeyLegacy</A></CODE>
64
65</p>
66
67<H2>Revision History</H2>
68<DL>
69
70<DT><para>1.4.15</DT>
71<DD>Initial version.</DD>
72
73</DL>
74<hr><p>CONFIDENTIAL</p></body>
75</html>
76