1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <title>GetSimpleAddress</title>
8  </head>
9  <body>
10    <h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/cfg/Overview.html">cfg</a>::<a href="../../../nn/cfg/CTR/Overview.html">CTR</a>::GetSimpleAddress</CODE> Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">#include &lt;nn/cfg.h&gt;
14
15<a href="../../../nn/Result/Overview.html">nn::Result</a> GetSimpleAddress(
16     <a href="../../../nn/cfg/CTR/SimpleAddress/Overview.html">SimpleAddress</a> * pSimpleAddress,
17     <a href="../../../nn/cfg/CTR/SimpleAddressId/Overview.html">SimpleAddressId</a> simpleAddressId,
18     <a href="../../../nn_types/uptr.html">uptr</a> pWorkMemory,
19     <a href="../../../nn_types/u32.html">u32</a> workMemorySize
20);
21</pre>
22    </div>
23    <h2>Parameters</h2>
24    <div class="section">
25      <table class="arguments">
26        <thead>
27          <tr>
28            <td width="15" />
29            <th>Name</th>
30            <td>Description</td>
31          </tr>
32        </thead>
33        <tr>
34          <td>out</td>
35          <th>pSimpleAddress</th>
36          <td>Stores the obtained simple address information.</td>
37        </tr>
38        <tr>
39          <td>in</td>
40          <th>simpleAddressId</th>
41          <td>Specifies the ID of the simple address information to be obtained.</td>
42        </tr>
43        <tr>
44          <td>in</td>
45          <th>pWorkMemory</th>
46          <td>Specifies the working memory used internally.</td>
47        </tr>
48        <tr>
49          <td>in</td>
50          <th>workMemorySize</th>
51          <td>Specifies the size of the working memory used internally.</td>
52        </tr> </table>
53    </div>
54    <h2>Return Values</h2>
55    <div class="section">The following <a href="../../../nn/Result/Overview.html"><CODE>Result</CODE></a> values are returned as the execution result.<br /> <br />
56      <table class="arguments">
57        <thead>
58          <tr>
59            <th>Value</th>
60            <td>Description</td>
61          </tr>
62        </thead>
63        <tr>
64          <th><CODE>Result::IsSuccess</CODE></th>
65          <td>The simple address information has been obtained successfully.</td>
66        </tr>
67        <tr>
68          <th><CODE>ResultNotFound</CODE></th>
69          <td>Could not find simple address information corresponding to the specified ID.<BR> This return value must always be handled.</td>
70        </tr>
71        <tr>
72          <th><CODE>ResultMountContentFailed</CODE></th>
73          <td>Failed to mount content.<BR> Check whether <a href="../../../nn/fs/Initialize.html"><CODE>nn::fs::Initialize</CODE></a> has been called prior to calling this function.</td>
74        </tr>
75        <tr>
76          <th><CODE>ResultOutOfMemory</CODE></th>
77          <td>Execution failed due to insufficient working memory.<BR>This error never occurs if memory equal to or greater than <a href="../../../nn/cfg/CTR/CFG_SIMPLE_ADDRESS_WORKMEMORY_SIZE.html"><CODE>nn::cfg::CTR::CFG_SIMPLE_ADDRESS_WORKMEMORY_SIZE</CODE></a> is allocated.</td>
78        </tr>
79      </table> </div>
80    <h2>Description</h2>
81    <div class="section">
82      <p>Gets the simple address information (such as the country and region name) having the specified ID.</p><p>Before calling this function, you must initialize the <a href="../../../nn/fs/Overview.html"><CODE>FS</CODE></a> library by calling the <CODE><a href="../../../nn/fs/Initialize.html">nn::fs::Initialize</a></CODE> function.<br /> Do not call this function simultaneously from multiple threads.<BR></p><p>This function uses the memory buffer given by <CODE>pWorkMemory</CODE> as working memory. The required memory size is given by <a href="../../../nn/cfg/CTR/CFG_SIMPLE_ADDRESS_WORKMEMORY_SIZE.html"><CODE>nn::cfg::CTR::CFG_SIMPLE_ADDRESS_WORKMEMORY_SIZE</CODE></a>. Do not write to or free the specified working memory during execution of this function. Furthermore, be sure the application frees the specified working memory after it is finished being used.<BR></p><p>The size of the <a href="../../../nn/cfg/CTR/SimpleAddress/Overview.html">SimpleAddress</a> 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 <CODE>NULL</CODE> terminated.<BR></p><p>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.<BR> <a href="../../../nn/cfg/CTR/ResultNotFound/Overview.html"><CODE>ResultNotFound</CODE></a> is returned if you specify an unknown ID to this function. This return value must always be handled.</p><!-- write here --></div>
83    <h2>Revision History</h2>
84    <div class="section">
85      <dl class="history">
86        <dt>2011/10/11</dt>
87        <dd>Added more details specific to simple address information.<br />
88        </dd>
89        <dt>2010/05/27</dt>
90        <dd>Initial version.<br />
91        </dd>
92      </dl>
93    </div>
94  <hr><p>CONFIDENTIAL</p></body>
95</html>