#include <dwc.h>
u64 DWC_CreateFriendKey( const DWCUserData* userdata );
u64 DWC_CreateFriendKeyLegacy( const DWCUserData* userdata );
Generates a friend registration key from the user data that will be exchanged with friends. Display the acquired friend registration key as a 12-digit base-10 numerical value.
In friend registration, after verifying the validity of the friend registration key entered by the user with the DWC_CheckFriendKey, create the friend data using the DWC_CreateFriendKeyToken function and add the created information to the friend roster.
In addition, assume that friend registration keys may sometimes be entered incorrectly; therefore, prepare an interface that allows users to reenter the friend registration key until it is accepted.
When the Nintendo Wi-Fi Connection has never been used, a friend registration key cannot be created, so make some kind of interface to create one after making a connection, or display a message with those instructions.
Note: Starting from NITRO-DWC 3.0, a different method is being employed to generate the value used to check the validity of friend registration keys. Because of this change, the friend registration keys created with older versions of NITRO-DWC are no longer compatible with the DWC_CreateFriendKey function. If for some special reason you need to be able to deal with these legacy friend registration keys, use the DWC_CreateFriendKeyLegacy function and the DWC_CheckFriendKeyLegacy function.
userdata |
Pointer to the DWCUserData structure where user data is stored. |
positive value |
Friend registration key |
0 |
Failed because the profile is not obtained. |
DWC_CreateFriendKeyToken, DWC_CheckFriendKey
2008/03/02 Added text about compatibility with older specification.
2008/01/16 Added warning about the compatibility of friend registration keys.
2007/01/25 Added text about checking the friend registration keys.
2005/12/16 Revision.
2005/10/20 Initial version.
CONFIDENTIAL