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>FS_CreateFileFromRom</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">FS_CreateFileFromRom <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;nitro/fs.h&gt;</CODE><BR>
20  <BR>
21  <CODE>BOOL FS_CreateFileFromRom(<A href="../fs_file_type.html">FSFile</A> *p_file, u32 offset, u32 size);</CODE><br>
22  <br>
23  </dd>
24</dl>
25<h2>Arguments</h2>
26<TABLE border="1" width="100%">
27  <TBODY>
28    <TR>
29<TD width="13%"><SPAN class="argument">p_file</SPAN></TD>
30<TD width="87%">Address of the <A href="../fs_file_type.html"><CODE>FSFile</CODE></A> structure.</TD>
31    </TR>
32    <TR>
33<TD width="13%"><SPAN class="argument">offset</SPAN></TD>
34<TD width="87%">Offset for start of CARD-ROM region for the read.</TD>
35    </TR>
36    <TR>
37<TD width="13%"><SPAN class="argument">size</SPAN></TD>
38<TD width="87%">Byte size of the target region from the offset.</TD>
39    </TR>
40  </TBODY>
41</TABLE>
42
43<h2>Return Values</h2>
44<p><CODE>TRUE</CODE> if the file opens properly; <CODE>FALSE</CODE> otherwise.</p>
45
46<H2>Description</H2>
47<P>Treats the specified CARD-ROM region as a temporary file and opens the file. The file opened by this function supports only these following functions. <code>
48<ul>
49<li><A href="FS_SeekFile.html"><CODE>FS_SeekFile</CODE></A>, <A href="FS_SeekFileToBegin.html"><CODE>FS_SeekFileToBegin</CODE></A>, <A href="FS_SeekFileToEnd.html"><CODE>FS_SeekFileToEnd</CODE></A>
50<li><A href="FS_ReadFile.html"><CODE>FS_ReadFile</CODE></A>
51<li><A href="FS_ReadFileAsync.html"><CODE>FS_ReadFileAsync</CODE></A>
52<li><A href="FS_CloseFile.html"><CODE>FS_CloseFile</CODE></A>
53</ul>
54</code>
55</P>
56<P>
57For more information, see the explanation for the <A href="../archive_rom_spec.html"><CODE>ROM Archive</CODE></a> function.
58</P>
59<H2>Note</H2>
60<ul>
61<li style='color:Red;'>
62This function cannot be called from the interrupt handler (IRQ mode).<br />Also note that in some cases processing may not end if interrupts are left prohibited.</li>
63<li style='color:Red;'>Because the structures of opened files are linked with system resources, you cannot move or duplicate the information in these structures by copying them into other structures. For details, see the <a href="../fs_file_type.html"><CODE>FSFile</CODE></a> structure.</li>
64</ul>
65
66<h2>See Also</h2>
67<p><A href="../fs_file_type.html"><CODE>FSFile</CODE></A><BR> <A href="../fs_archive_type.html"><CODE>FSArchive</CODE></A><BR> <A href="../archive_rom_spec.html">ROM Archive</a></p>
68
69<H2>Revision History</H2>
70<P>
712009/07/29 Added mention that copying structure values is not guaranteed.<br />
72 2005/06/28 Initial version.</P>
73<hr><p>CONFIDENTIAL</p></body>
74</html>
75