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>Initialize</title> 8 </head> 9 <body> 10<h1><CODE>nn::dlp::CTR::Server::Initialize</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../../nn/Result/Overview.html">nn::Result</a> Initialize( 15 <a href="../../../../nn/Handle/Overview.html">nn::Handle</a> eventHandle, 16 u8 maxClientNum, 17 u8 childIndex, 18 void * pBuffer, 19 size_t bufferSize, 20 size_t blockBufferSize = <a href="../../../../nn/dlp/CTR/MIN_NETWORK_BLOCK_BUFFER_SIZE.html">MIN_NETWORK_BLOCK_BUFFER_SIZE</a> *2, 21 size_t blockBufferNum = <a href="../../../../nn/dlp/CTR/MIN_NETWORK_BLOCK_BUFFER_NUM.html">MIN_NETWORK_BLOCK_BUFFER_NUM</a> 22); 23</pre> 24 </div> 25<h2>Arguments</h2> 26 <div class="section"> 27 <table class="arguments"> 28 <thead> 29 <tr> 30 <td width="15" /> 31<th>Name</th> 32<td>Description</td> 33 </tr> 34 </thead> 35 <tr> 36<td>in</td> 37<th>eventHandle</th> 38<td>Specifies a handle to the <CODE><a href="../../../../nn/os/Event/Overview.html">nn::os::Event</a></CODE> object waiting for a signal from download play. Initialize the event in the application. Use the <CODE>GetEventDesc</CODE> function to get the event information.</td> 39 </tr> 40 <tr> 41<td>in</td> 42<th>maxClientNum</th> 43<td>Specifies the maximum number of clients (from <CODE>1</CODE> to <CODE>MAX_CLIENT_NUM</CODE>) that can connect to the server.</td> 44 </tr> 45 <tr> 46<td>in</td> 47<th>childIndex</th> 48<td>Specify the index (the RSF <CODE>ChildIndex</CODE>) of the child program to distribute. You can specify a value between 0 and 255. (A server can have up to 256 children.)</td> 49 </tr> 50 <tr> 51<td>in</td> 52<th>pBuffer</th> 53<td>Pointer to the DLP working buffer. Must be 4096-byte aligned.</td> 54 </tr> 55 <tr> 56<td>in</td> 57<th>bufferSize</th> 58<td>Size of working buffer. Must be 4096-byte aligned.</td> 59 </tr> 60 <tr> 61<td>in</td> 62<th>blockBufferSize</th> 63<td>This is the size of the block buffer when data that has been read from a file is kept before sending. Specify a size larger than MIN_NETWORK_BLOCK_BUFFER_SIZE and smaller than MAX_NETWORK_BLOCK_BUFFER_SIZE.</td> 64 </tr> 65 <tr> 66<td>in</td> 67<th>blockBufferNum</th> 68<td>This is the number of block buffers. Specify a size larger than MIN_NETWORK_BLOCK_BUFFER_NUM and smaller than MAX_NETWORK_BLOCK_BUFFER_NUM.</td> 69 </tr> </table> 70 </div> 71<h2>Return Values</h2> 72<div class="section">The following <a href="../../../../nn/Result/Overview.html"><CODE>Result</CODE></a> values are returned as the result of the operation.<br /> <br /> 73 <table class="arguments"> 74 <thead> 75 <tr> 76<th>Value</th> 77<td>Description</td> 78 </tr> 79 </thead> 80 <tr> 81<th><CODE>ResultSuccess</CODE></th> 82<td>Initialization was successful.</td> 83 </tr> 84 <tr> 85<th><CODE>ResultInvalidPointer</CODE></th> 86<td>pBuffer is either NULL or not 4096-byte aligned.</td> 87 </tr> 88 <tr> 89<th><CODE>ResultOutOfRange</CODE></th> 90<td>maxClientNum, bufferSize, blockBufferSize, and blockBufferNum are invalid.</td> 91 </tr> 92 <tr> 93<th><CODE>ResultInvalidHandle</CODE></th> 94<td>eventHandle is invalid.</td> 95 </tr> 96 <tr> 97<th><CODE>ResultAlreadyOccupiedWirelessDevice</CODE></th> 98<td>The wireless device is already occupied for another purpose. Exit the other wireless process.</td> 99 </tr> 100 <tr> 101<th><CODE>ResultInternalError</CODE></th> 102<td>An unrecoverable error was occurred internally.</td> 103 </tr> 104 <tr> 105<th><CODE>ResultWirelessOff</CODE></th> 106<td>Communications cannot occur in this state (sleep or the Wifi button is off).</td> 107 </tr> 108 <tr> 109<th><CODE>ResultInvalidMediaType</CODE></th> 110<td>The media type of the parent device is not supported.</td> 111 </tr> 112 <tr> 113<th><CODE>ResultFailedToAccessMedia</CODE></th> 114<td>Cannot access the media. The child program may not be properly installed on the parent or a card may have been removed.</td> 115 </tr> 116 <tr> 117<th><CODE>ResultChildTooLarge</CODE></th> 118<td>The child program exceeds the standard import size (<CODE>MAX_CHILD_IMPORT_SIZE</CODE>).</td> 119 </tr> 120 <tr> 121<th><CODE>ResultInvalidRegion</CODE></th> 122<td>The child program and the system have different regions.</td> 123 </tr> 124 </table> </div> 125<h2>Description</h2> 126 <div class="section"> 127<p>Initializes the server.</p><p>For the <SPAN class="argument">pBuffer</SPAN> argument, specify a 4096-byte aligned buffer of the size specified by the <CODE><a href="../../../../nn/dlp/CTR/Server/GetBufferSize.html">GetBufferSize</a></CODE> function. Do not use device memory for the buffer. It is possible to distribute a child program of up to 32 MB.</p><!-- write here --></div> 128<h2>Revision History</h2> 129 <div class="section"> 130 <dl class="history"> 131 <dt>2010/08/16</dt> 132<dd>Initial version.<br /> 133 </dd> 134 </dl> 135 </div> 136 <hr><p>CONFIDENTIAL</p></body> 137</html>