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_CreateFriendKey</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13<a name="dwc__account_8h_1643a6e9b0ada98985feebc003af5cac3"></a> 14<h1 align="left">DWC_CreateFriendKey</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <dwc.h></CODE><BR> 20 <BR> 21 <PRE><CODE>u64 <a href=DWC_CreateFriendKey.html#dwc__account_8h_1643a6e9b0ada98985feebc003af5cac3>DWC_CreateFriendKey</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 where the user data is stored.</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 a 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 using 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 service has never been used, a friend code cannot be created. Thus, you should either set up an interface to create a code after making a connection or you should display a message with the appropriate instructions.</p><p>In RVLDWC1.4.15, changed the algorithm for generating friend codes. Note that there is no compatibility with friend codes generated using previous versions. To create friend codes that are compatible with previous versions, use the <a href=DWC_CreateFriendKeyLegacy.html#dwc__account_8h_1daacffcbbb3a2371dabd1bd4b1a1a84a><CODE>DWC_CreateFriendKeyLegacy</CODE></a> function.</p> 57 58<h2>See Also</h2> 59<p> 60 61 <CODE><A href="DWC_CreateFriendKeyLegacy.html">DWC_CreateFriendKeyLegacy</A></CODE> 62 63 <CODE><A href="DWC_CheckFriendKey.html">DWC_CheckFriendKey</A></CODE> 64 65</p> 66 67<H2>Revision History</H2> 68<DL> 69 70<DT><para>1.4.15</DT> 71<DD>Added a precaution to reflect modification of the creation algorithm.</DD> 72 73</DL> 74<hr><p>CONFIDENTIAL</p></body> 75</html> 76