1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<TITLE>NWC24SetMsgAttached</TITLE> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8</HEAD> 9<BODY> 10<H1>NWC24SetMsgAttached</H1> 11 12<H2>C Specification</H2> 13<DL> 14 <DD><PRE><CODE>#include <revolution/nwc24.h></CODE></PRE> 15 <DD><PRE><CODE><A HREF="../Types/NWC24Err.html">NWC24Err</A> NWC24SetMsgAttached( 16 <A HREF="../Types/NWC24MsgObj.html">NWC24MsgObj</A>* <EM>obj</EM>, 17 const char* <EM>data</EM>, 18 u32 <EM>size</EM>, 19 <A HREF="../Types/NWC24MIMEType.html">NWC24MIMEType</A> <EM>type</EM> 20);</CODE></PRE> 21</DL> 22 23<H2>Description</H2> 24<P> 25Attaches binary data to the message. A maximum of two pieces of data can be attached to a single message. To perform multiple binary attachments, <CODE>NWC24SetMsgAttached()</CODE> must be called as many times as needed. 26</P> 27 28<P> 29The amount of binary data that can be attached depends on the size of the document, but the maximum total size is 148,912 bytes. The type of the binary data is a separate factor that also limits the size. 30</P> 31 32<P> 33The buffer given by the <CODE><EM><STRONG>data</STRONG></EM></CODE> argument is not freed until <A HREF="NWC24CommitMsg.html"><CODE>NWC24CommitMsg()</CODE></A> is called and creation of the message is complete. 34</P> 35 36<H2>Arguments</H2> 37<TABLE border="1" cellpadding="3" cellspacing="0.1"> 38 <TR> 39<TD width="120" bgcolor="#ffffe8"><code><em><strong>obj</strong></em></code></TD> 40 <TD width="520"> 41Pointer to the message object to be set. 42 </TD> 43 </TR> 44 <TR> 45<TD width="120" bgcolor="#ffffe8"><code><em><strong>data</strong></em></code></TD> 46 <TD width="520"> 47Pointer to the binary data to be attached. 48 </TD> 49 </TR> 50 <TR> 51<TD width="120" bgcolor="#ffffe8"><code><em><strong>size</strong></em></code></TD> 52 <TD width="520"> 53Size of the binary data specified by <code><em><strong>data</strong></em></code> 54<BR> upper limit: 148,912 bytes (two combined)</TD> 55 </TR> 56 <TR> 57<TD width="120" bgcolor="#ffffe8"><code><em><strong>type</strong></em></code></TD> 58 <TD width="520"> 59Binary data type.<BR> 60 <TABLE width="500" border="1" cellspacing="0.1"> 61 <tr> 62<TD width="150" bgcolor="#C0C0C0">Name</TD> 63<TD width="350" bgcolor="#C0C0C0">Description</TD> 64 </tr> 65 <tr> 66<TD width="150"><code>NWC24_APP_WII_MSGBOARD</code></TD> 67<TD width="350">Letterform data (data format used on Wii Message Board).<BR>Size upper limit: 122,880 bytes.</TD> 68 </tr> 69 <tr> 70<TD width="150"><code>NWC24_IMG_JPEG</code></TD> 71<TD width="350">JPEG image</TD> 72 </tr> 73 <tr> 74<TD width="150"><code>NWC24_APP_OCTET_STREAM</code></TD> 75<TD width="350">Ordinary binary (data that can be freely used by each application)</TD> 76 </tr> 77 </TABLE> 78<BR> <STRONG>Note:</STRONG> Operations are not guaranteed if you specify any values defined in <CODE><A HREF="../Types/NWC24MIMEType.html">NWC24MIMEType</A></CODE> other than those described above. 79 </TD> 80 </TR> 81</TABLE> 82 83<h2>Return Values</h2> 84<P> 85<code>NWC24_OK</code>: Normal termination.<BR> <code>NWC24_ERR_PROTECTED</code>: Cannot change message object.<BR> <code>NWC24_ERR_NULL</code>: The <code><em><strong>data</strong></em></code> argument is a null pointer, or <code><em><strong>size</strong></em></code> is zero.<BR> <code>NWC24_ERR_FULL</code>: The limit has been reached already for attached binary data.<BR> <code>NWC24_ERR_OVERFLOW</code>: The binary data size has exceeded the attachable limit.<BR> <code>NWC24_ERR_INVALID_VALUE</code>: Invalid binary data type specified for <code><em><strong>type</strong></em></code>.<BR><code>NWC24_ERR_NOT_SUPPORTED</code>: Data format is not supported. 86</P> 87 88<H2>See Also</H2> 89<P> 90<A href="NWC24InitMsgObj.html"><CODE>NWC24InitMsgObj</CODE></A> 91</P> 92 93<H2>Revision History</H2> 94<P> 952007/11/21 Made revisions in conjunction with the present implementation. 96<BR> 2007/07/26 Made revisions in conjunction with the present implementation. <BR> 2007/07/12 Added text about size restrictions.<BR>2007/05/03 Added a precaution about the values that can be specified for <code><em><strong>type</strong></em></code>.<BR>2006/11/13 Added text about buffer handling.<BR>2006/10/06 Incorporated changes to names of binary data types.<BR>2006/08/01 Initial version.</P> 97 98<hr><p>CONFIDENTIAL</p></body> 99</HTML>