1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<title>FS_RegisterArchiveName</title>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</head>
10<body>
11<h1 align="left">FS_RegisterArchiveName <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1>
12<h2>Syntax</h2>
13<dl>
14  <dd>
15<CODE>#include &lt;nitro/fs.h&gt;</CODE><BR>
16  <BR>
17  <CODE>BOOL	FS_RegisterArchiveName(<A href="../fs_archive_type.html">FSArchive</a> *p_arc,
18	const char *name, u32 name_len);</CODE><br>
19  <br>
20  </dd>
21</dl>
22<h2>Arguments</h2>
23<TABLE border="1" width="100%">
24  <TBODY>
25    <TR>
26      <TD width="13%"><EM><STRONG>p_arc</STRONG></EM></TD>
27      <TD width="87%">Address of the <A href="../fs_archive_type.html"><code>FSArchive</code></a> structure.</TD>
28    </TR>
29    <TR>
30      <TD width="13%"><EM><STRONG>name</STRONG></EM></TD>
31      <TD width="87%">Pointer to the string containing the name being registered</TD>
32    </TR>
33    <TR>
34      <TD width="13%"><EM><STRONG><code><EM><STRONG>name_len</STRONG></EM></code></STRONG></EM></TD>
35      <TD width="87%">The string length of <em><code>name</code></em></TD>
36    </TR>
37  </TBODY>
38</TABLE>
39<h2>Return Values</h2>
40<p><code>TRUE</code> if the archive with the specified name has been correctly registered in the file system. <code>FALSE</code> otherwise.</p>
41<H2>Description</H2>
42<P>Registers the archive in the file system using the specified name. Only alphanumeric characters can be used for <code>name</code>. <em>Not</em> case-sensitive&mdash;all characters are treated as lowercase.<br />If the end character (<code>\0</code>) is included in the string for <code>name</code> at some position that makes <code>name</code> shorter than specified by <code>name_len</code>, then that shorter length is used.<BR> The function fails if an empty string &quot;&quot; is specified or if <code>name_len</code> is longer than <code>FS_ARCHIVE_NAME_LEN_MAX</code>.<br /><BR> The function also fails if the value of <code>name</code> is already registered in the file system.<br /> You cannot use <code>rom</code> as a name because the file system registers an archive with the name <code>rom</code> when the <code><a href="../file/FS_Init.html">FS_Init</a></code> function executes. The registered archive can be loaded to the file system with the <code><a href="FS_LoadArchive.html">FS_LoadArchive</a></code> function. There are no restrictions regarding the time between registering a name and actually loading the archive. You can use the same name numerous times by repeatedly loading it and unloading it. <BR> <BR>
43<h2>See Also</h2>
44<p><code><a href="../fs_archive_type.html">FSArchive</a></code><BR> <code><a href="../fs_archive_name_len_max_const.html">FS_ARCHIVE_NAME_LEN_MAX</a></code><BR> <code><a href="FS_ReleaseArchiveName.html">FS_ReleaseArchiveName</a></code><BR> <code><a href="FS_LoadArchive.html">FS_LoadArchive</a></code><BR> <code><a href="FS_UnloadArchive.html">FS_UnloadArchive</a></code></P>
45<H2>Revision History</H2>
46<P>2004/06/30 Initial version.</P>
47<hr><p>CONFIDENTIAL</p></body>
48</html>
49