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>SetResource</title> 8 </head> 9 <body> 10 <h1>nw::lyt::GraphicsResource::SetResource Member Function</h1> 11 <h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14void SetResource( 15 int index, 16 void * content, 17 <span>u32</span> fileSize, 18 bool bFree = true 19); 20</pre> 21 </div> 22 <h2>Arguments</h2> 23 <div class="section"> 24 <table class="arguments"> 25 <thead> 26 <tr> 27 <td width="15" /> 28 <th>Name</th> 29 <td>Description</td> 30 </tr> 31 </thead> 32 <tr> 33 <td /> 34 <th><CODE>index</CODE></th> 35 <td>The resource file index number.</td> 36 </tr> 37 <tr> 38 <td /> 39 <th>content</th> 40 <td>Resource file contents.</td> 41 </tr> 42 <tr> 43 <td /> 44 <th>fileSize</th> 45 <td>Resource file size.</td> 46 </tr> 47 <tr> 48 <td /> 49 <th>bFree</th> 50 <td>Leaves deletion of memory for content up to the library.</td> 51 </tr> </table> 52 </div> 53 <h2>Return Values</h2> 54 <div class="section"> 55 None. 56 </div> 57 <h2>Description</h2> 58 <div class="section"> 59 <p>Sets the resource file.</p><p>Specify the index when the path was obtained in <SPAN class="argument">index</SPAN>.</p><p>If <CODE>true</CODE> is specified in <SPAN class="argument">bFree</SPAN>, the library frees the memory pointed to by <SPAN class="argument">content</SPAN> using <a href="../../../nw/lyt/Layout/FreeMemory.html"><CODE>Layout::FreeMemory()</CODE>. Memory for <SPAN class="argument">content</SPAN> must be allocated using <a href="../../../nw/lyt/Layout/AllocMemory.html"><CODE>Layout::AllocMemory()</CODE></a>.</p></div> 60 <h2>See Also</h2> 61 <div class="section"> 62 <p class="reference"><a href="../../../nw/lyt/GraphicsResource/StartSetup.html">StartSetup</a><br /><a href="../../../nw/lyt/Layout/AllocMemory.html">Layout::AllocMemory</a><br /> </p> 63 </div> 64 <h2>Revision History</h2> 65 <div class="section"> 66 <dl class="history"> 67 <dt>2010/04/23</dt> 68 <dd>Added the <SPAN class="argument">bFree</SPAN> argument.<br /> 69 </dd> 70 <dt>2009/09/18</dt> 71 <dd>Initial version.<br /> 72 </dd> 73 </dl> 74 </div> 75 <hr><p>CONFIDENTIAL</p></body> 76</html>