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_GetSegmentLength</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MB_GetSegmentLength <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> <BR> <CODE>u32 MB_GetSegmentLength(FSFile *file);</CODE><br> <br> 20 </dd> 21</dl> 22<h2>Arguments</h2> 23<p> 24<TABLE border="1" width="100%"> 25 <TBODY> 26 <TR> 27<TD width="13%"><EM><STRONG>file</STRONG></EM></TD> 28<TD width="87%">The <code>FSFile</code> structure that holds the program file handle. The seek position of this file must point to the top of the program binary. Also, the seek position holds the initial position when returned from this function. When NULL is specified for this pointer, the parent application is the download program file and the size is calculated. 29 </TD> 30 </TR> 31 </TBODY> 32</TABLE> 33</p> 34 35<h2>Return Values</h2> 36<p>This function returns a byte size greater than 0 when the program completes successfully. Otherwise, it returns 0.</p> 37 38<H2>Description</H2> 39<P>This function returns the memory size necessary to register the specified program file to the multi-boot process. For more information, see the <CODE><A href="MB_ReadSegment.html">MB_ReadSegment</A></CODE> function.<br><BR> This function calls the <CODE><A href="../../fs/file/FS_ReadFile.html">FS_ReadFile</A></CODE> function internally.<br><br> 40</p> 41<h2>See Also</h2> 42<p> 43<code><A href="../mb_segment_buffer_min_const.html">MB_SEGMENT_BUFFER_MIN</A><BR> <A href="MB_ReadSegment.html">MB_ReadSegment</A><BR> <A href="MB_RegisterFile.html">MB_RegisterFile</A></code> 44</p> 45<H2>Revision History</H2> 46<P> 472004/11/11 Changed description to include the clone boot release and new read delay method.<br /> 2004/09/10 Added a description of the operation when specifying NULL for the file pointer.<br /> 2004/08/09 Initial version. 48</P> 49<hr><p>CONFIDENTIAL</p></body> 50</html> 51