1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MB_RegisterFile</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MB_RegisterFile <IMG src="../../image/NTR.gif" width="24" height="12" border="0" align=middle><IMG src="../../image/TWL.gif" width="24" height="12" border="0" align=middle></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/mb.h></CODE><BR> 20 <BR> 21 <CODE>BOOL MB_RegisterFile(const MBGameRegistry *game_reg, const void *buf);</CODE><br> 22 <br> 23 </dd> 24</dl> 25<h2>Arguments</h2> 26<p> 27<TABLE border="1" width="100%"> 28 <TBODY> 29 <TR> 30 <TD width="13%"><EM><STRONG>game_reg</STRONG></EM></TD> 31 <TD width="87%">Pointer to the <CODE><A href="../mb_game_registry_type.html">MBGameRegistry</A></CODE> structure where the program information to register is saved.</TD> 32 </TR> 33 <TR> 34 <TD width="13%"><EM><STRONG>buf</STRONG></EM></TD> 35 <TD width="87%">Pointer to memory storing the extracted segment information.<BR> 36 This segment information is obtained with the <CODE><A href="MB_ReadSegment.html">MB_ReadSegment</A></CODE> function.<BR> 37 If the function succeeds, the memory specified here is used internally until the <CODE><A href="MB_UnregisterFile.html">MB_UnregisterFile</A></CODE> function is called.</TD> 38 </TR> 39 </TBODY> 40</TABLE> 41</p> 42 43<h2>Return Values</h2> 44<p>Returns <code>TRUE</code> when the program registers correctly. Otherwise, returns <code>FALSE</code>.</p> 45 46<H2>Description</H2> 47<P>This function registers the specified program file on the download program list. The parent can simultaneously download game programs up to <code>MB_MAX_FILE</code>.<FONT color="red">The binaries that can operate on a child device during multiboot are NITRO ROMs and HYBRID ROMs. </FONT>For details, see the <A href="../overview/mb_for_twl.html">Overview</A>. <br>Before calling this function, specify the segment data by calling the <CODE><A href="MB_ReadSegment.html">MB_ReadSegment</A></CODE> function.<br><font color="#800000">When calling this function using segment data that is set for dynamic reading from an archive, note that the MB library will internally start a single thread automatically. For details, see <B>Internal Operation</B> in the <CODE><A href="MB_ReadSegment.html">MB_ReadSegment</A></CODE> function.</font><br> <br></CODE></p> 48<P><B><FONT color=red>Note:</FONT></B><BR> When a DS Single-Card Play child selects a game on the IPL, the game may be downloaded from a parent that is not selected, if a particular procedure is performed on the parent side. This problem can be prevented by setting a different GGID in the <CODE>MBGameRegistry</CODE> structure for each game registered with the <CODE><A href="./MB_RegisterFile.html">MB_RegisterFile</A></CODE> function.<BR> 49</P> 50<h2>See Also</h2> 51<p><code><A href="../mb_game_registry_type.html">MBGameRegistry</A>, <A href="MB_GetSegmentLength.html">MB_GetSegmentLength</A>, <A href="MB_ReadSegment.html">MB_ReadSegment</A>, <A href="MB_UnregisterFile.html">MB_UnregisterFile</A></code></P> 52<H2>Revision History</H2> 53<P> 542008/09/16 Added a note on restrictions on programs downloaded with the MB library. <BR>2005/02/22 Added a description of problems with DS Single-Card Play. <BR>2005/04/11 Added a note and link for task threads. <BR>2004/09/09 Added a description of the <CODE>MB_UnregisterFile</CODE> function. <BR>2004/08/09 Initial version.<br> 55</P> 56<hr><p>CONFIDENTIAL</p></body> 57</html> 58