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>CreateMessageBox</title>
8  </head>
9  <body>
10    <h1><CODE>nn::cec::CTR::MessageBox::CreateMessageBox</CODE> Member Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">
14<a href="../../../../nn/Result/Overview.html">nn::Result</a> CreateMessageBox(
15     const <a href="../../../../nn/cec/CTR/TitleId.html">TitleId</a> cecTitleId,
16     const u32 privateId,
17     const char * hmacKey,
18     void * icon,
19     size_t iconSize,
20     wchar_t * name,
21     size_t nameSize,
22     size_t inboxSizeMax = CEC_INBOX_SIZE_DEFAULT,
23     size_t outboxSizeMax = CEC_OUTBOX_SIZE_DEFAULT,
24     size_t inboxMessNumMax = CEC_INBOX_MESSNUM_DEFAULT,
25     size_t outboxMessNumMax = CEC_OUTBOX_MESSNUM_DEFAULT,
26     size_t messageSizeMax = CEC_MESSSIZEMAX_DEFAULT
27);
28
29<a href="../../../../nn/Result/Overview.html">nn::Result</a> CreateMessageBox(
30     const <a href="../../../../nn/cec/CTR/TitleId.html">TitleId</a> cecTitleId,
31     const u32 privateId,
32     const char * hmacKey,
33     size_t inboxSizeMax = CEC_INBOX_SIZE_DEFAULT,
34     size_t outboxSizeMax = CEC_OUTBOX_SIZE_DEFAULT,
35     size_t inboxMessNumMax = CEC_INBOX_MESSNUM_DEFAULT,
36     size_t outboxMessNumMax = CEC_OUTBOX_MESSNUM_DEFAULT,
37     size_t messageSizeMax = CEC_MESSSIZEMAX_DEFAULT
38);
39</pre>
40    </div>
41    <h2>List of Overloaded Member Functions</h2>
42    <div class="section">
43      <table class="members">
44        <tr>
45          <td>
46            <a href="./CreateMessageBox(0).html"><CODE>CreateMessageBox(const TitleId, const u32, const char *, void *, size_t, wchar_t *, size_t, size_t, size_t, size_t, size_t, size_t)</CODE> </a>
47          </td>
48          <td>Creates a <CODE>MessageBox</CODE>. An inbox and outbox are created within the message box. Any <a href="../../../../nn/cec/CTR/Message/Overview.html">message</a> set in the outbox is automatically sent during StreetPass communication, and any received data is stored in the inbox.</td>
49        </tr>
50        <tr>
51          <td>
52            <a href="./CreateMessageBox(1).html"><CODE>CreateMessageBox(const TitleId, const u32, const char *, size_t, size_t, size_t, size_t, size_t)</CODE> </a>
53          </td>
54          <td>Creates a <CODE>MessageBox</CODE>. An inbox and outbox are created within the message box.</td>
55        </tr> </table>
56    </div>
57    <h2>Description of <CODE>CreateMessageBox(const TitleId, const u32, const char *, void *, size_t, wchar_t *, size_t, size_t, size_t, size_t, size_t, size_t)</CODE></h2>
58    <div class="section"><p><CODE>MessageBox</CODE> objects are created in NAND memory. Only one box may be created for each application. Only 12 boxes may be created in total. Attempting to create a new message box when 12 already exist will not create a new box.<br /><br /> The <SPAN class="argument">privateId</SPAN> and <SPAN class="argument">hmacKey</SPAN> values are used to restrict access. The <SPAN class="argument">privateId</SPAN> value is the key needed to open a message box and is intended to be limited to one system. The <SPAN class="argument">hmacKey</SPAN> value is a key common to all instances of an application and is used to prevent data tampering and application spoofing. These keys are stored in the message box. Set shared keys in an appropriate configuration if you need to access the same message box from multiple save-data files or applications.<br /><br /> There are two types of StreetPass icons used on System Settings screens and other screens. There is a box icon and an icon for individual messages. You must specify both. This function sets the box icon.</p><!-- write here --></div>
59    <h2>Description of <CODE>CreateMessageBox(const TitleId, const u32, const char *, size_t, size_t, size_t, size_t, size_t)</CODE></h2>
60    <div class="section"><p>(In the final version, icons and application names must be set. This format is maintained for compatibility with previous versions.)</p><!-- write here --></div>
61  <hr><p>CONFIDENTIAL</p></body>
62</html>