#include <dwc.h>u64 DWC_CreateFriendKeyLegacy(const DWCUserData *userdata);| userdata | Pointer to the DWCUserData structure that stores user data. |
| Positive value | Friend code. |
| 0 | Failed because the profile has not been obtained. |
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 DWC_CreateFriendKeyToken function, then add this created friend data to the friend roster.
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.
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.
In RVLDWC1.4.15, changed the algorithm for generating friend codes. Use the DWC_CreateFriendKey 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.
DWC_CreateFriendKey
DWC_CheckFriendKeyLegacy
CONFIDENTIAL