nn::cfg::CTR::GetSimpleAddress Function

Syntax

#include <nn/cfg.h>

void GetSimpleAddress(
     SimpleAddress * pSimpleAddress
);

nn::Result GetSimpleAddress(
     SimpleAddress * pSimpleAddress,
     SimpleAddressId simpleAddressId,
     uptr pWorkMemory,
     u32 workMemorySize
);

List of Overloaded Member Functions

GetSimpleAddress ( SimpleAddress * ) Gets the simple address information (such as the country and region name) that has been set by System Settings.
GetSimpleAddress ( SimpleAddress *, SimpleAddressId, uptr, u32 ) Gets the simple address information (such as the country and region name) having the specified ID.

Description of GetSimpleAddress ( SimpleAddress * )

The size of the SimpleAddress structure is at least 4 KB. Be careful not to exhaust the stack if it is allocated on the stack. The country and region names in the simple address information are guaranteed to be NULL terminated.

Description of GetSimpleAddress ( SimpleAddress *, SimpleAddressId, uptr, u32 )

Before calling this function, you must initialize the FS library by calling the nn::fs::Initialize function.
Do not call this function simultaneously from multiple threads.

This function uses the memory buffer given by pWorkMemory as working memory. The required memory size is given by nn::cfg::CTR::CFG_SIMPLE_ADDRESS_WORKMEMORY_SIZE. Do not write to or free the specified working memory during execution of this function. Furthermore, make sure the application frees the specified working memory after it is finished being used.

The size of the SimpleAddress structure is at least 4 KB. Be careful not to exhaust the stack, if it is allocated on the stack. The country and region names in the simple address information are guaranteed to be NULL terminated.

Country and region IDs may be added later. If you get detailed information regarding country and region ID received from a peer, you must keep in mind cases where that ID is unknown.
ResultNotFound is returned if you specify an unknown ID to this function. This return value must always be handled.


CONFIDENTIAL