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.1.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>ENV_SetResourceSetArray</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">ENV_SetResourceSetArray <img src="../image/NTR.gif"align="middle"><img src="../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/env.h&gt;</CODE></PRE>
16  <PRE><CODE>void ENV_SetResourceSetArray( ENVResource* array[] );
17  </CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<TABLE border="1" width="100%">
21  <TBODY>
22    <TR>
23<TD width="20%"><EM><STRONG>array</STRONG></EM></TD>
24<TD width="80%"> Pointer to the array of the resource array.</TD>
25    </TR>
26  </TBODY>
27</TABLE>
28<H2>Return Values</H2>
29<P>None.</P>
30<H2>Description</H2>
31<P>Sets the resource array used in searching for resources.</P>
32<P>Any resource arrays that have been set before this point are removed from the search target, and the array specified here becomes the target.</P>
33<P>Inside the function, the resource array at the start of the array specified by the <SPAN class="argument">array</SPAN> argument is set by the <A href="ENV_SetResourceSet.html"><CODE>ENV_SetResourceSet</CODE></A> function, and the subsequent resource arrays up until <CODE>NULL</CODE> is encountered are added by the <A href="ENV_AppendResourceSet.html"><CODE>ENV_AppendResourceSet</CODE></A> function. Close the end of <SPAN class="argument">array</SPAN> with <CODE>NULL</CODE>.<P>See <A href="ENV_SetResourceSet.html"><CODE>ENV_SetResourceSet</CODE></A> for more on specifying the resource array.</P>
34<P>This function is called from the <A href="ENV_Init.html"><CODE>ENV_Init</CODE></A> function. At that time:</P>
35
36<BLOCKQUOTE style="background:#ffffcc"><PRE><FONT color="#ff0000">SDK_WEAK_SYMBOL</FONT> ENVResource *<FONT color="#ff0000">resourceArray</FONT>[] = { NULL };
37
38void ENV_Init(void)
39{
40    :
41 <FONT color="#ff0000">ENV_SetResourceSetArray( resourceArray );</FONT>
42}</PRE></BLOCKQUOTE>
43
44<P>Initialization is performed for <CODE>resourceArray</CODE>, defined with the WEAK symbol. Because the <CODE>ENV_Init</CODE> function is called from the <A href="../os/init/OS_Init.html"><CODE>OS_Init</CODE></A> function, all the application has to do is define its own unique <CODE>resourceArray</CODE>.</P>
45
46<BLOCKQUOTE style="background-color:#ffffcc"><B>Example:</B>
47The user program can simply make the following definition.
48
49<PRE>ENVResource myResource[] = {
50  &quot;test.member&quot;, ENV_U32(100),
51  ENV_RESOURCE_END
52};
53ENVResource <FONT color="#ff0000">resourceArray</FONT>[] = { myResource, NULL };</PRE>
54
55</BLOCKQUOTE>
56
57<P>Naturally, it is acceptable to specify other resource arrays later.</P>
58
59<BLOCKQUOTE style="background-color:#ffffcc"><B>Example:</B><BR>
60<BR>
61<CODE>ENV_SetResourceSetArray( anotherResourceArray );</CODE><BR>
62<BR>
63In this example, the newest configuration for <CODE>resourceArray</CODE> is used, not the one that was declared at the start.</BLOCKQUOTE>
64
65<H2>See Also</H2>
66<P><A href="ENV_Init.html"><CODE>ENV_Init</CODE></A><BR>
67<A href="ENV_SetResourceSet.html"><CODE>ENV_SetResourceSet</CODE></A><BR>
68<A href="ENV_AppendResourceSet.html"><CODE>ENV_AppendResourceSet</CODE></A></P>
69<H2>Revision History</H2>
70<P>2009/06/03 Explained that calling <CODE>OS_Init</CODE> is now required.<BR>
712008/12/19 Added example.<BR>
722005/10/07 Initial version.</P>
73<hr><p>CONFIDENTIAL</p></body>
74</HTML>
75