DWC_CreateFriendKeyLegacy

Syntax

#include <dwc.h>
u64 DWC_CreateFriendKeyLegacy(const DWCUserData *userdata);

Arguments

userdata Pointer to the DWCUserData structure where the user data is stored.

Return Values

positive value Friend registration key.
0 Failed because the profile is not obtained.

Description

Generates a friend registration key from user data so that the friend registration key can be passed to other hosts. Display the obtained friend registration key as a 12-digit base-10 numerical value.

In friend registration, first verify the validity of the user-entered friend registration key with the DWC_CheckFriendKey function, create the friend information using the DWC_CreateFriendKeyToken function, and add the created information to the friend roster.

Also consider the possibility that the user might make a mistake when entering the friend registration key, and prepare an interface that enables friend registration keys to be reentered up until the friend relationship is established.

When the local host has never connected to Nintendo Wi-Fi Connection, a friend registration key cannot be created, so you must either make an interface for generating a key after first connecting or display a message explaining this concept.

Note: This function remains in order to preserve compatibility with friend registration keys generated by NITRO-DWC versions prior to NITRO-DWC 3.0. Unless it is necessary to use the legacy functions, use the DWC_CreateFriendKey and DWC_CheckFriendKey functions.

See Also

DWC_CreateFriendKeyToken
DWC_CheckFriendKey
DWC_CreateFriendKey

Revision History

For the changelog prior to 5.1 PR2, click here.


CONFIDENTIAL