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_Init</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">ENV_Init <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 <nitro/env.h></CODE></PRE> 16 <PRE><CODE>void ENV_Init( void ); 17 </CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<P>None.</P> 21<H2>Return Values</H2> 22<P>None.</P> 23<H2>Description</H2> 24<P>Initializes the resource management system.</P> 25<P>The <A href="ENV_Init.html"><CODE>ENV_Init</CODE></A> function specifies resource arrays using the <A href="ENV_Init.html"><CODE>ENVResource* resourceArray[]</CODE></A> array, as shown below.</P> 26<BLOCKQUOTE style="background:#ffffcc"><CODE><FONT color="#ff0000">SDK_WEAK_SYMBOL</FONT> ENVResource *<FONT color="#ff0000">resourceArray</FONT>[] = { NULL };<BR> <BR> void ENV_Init(void)<BR> {<BR> :<BR><FONT color="#ff0000">ENV_SetResourceSetArray( resourceArray );</FONT><BR> }</CODE></BLOCKQUOTE> 27 28 29<P><CODE>resourceArray[]</CODE> is an array that holds resource arrays. Because <CODE>resourceArray[]</CODE> is an array of <CODE>NULL</CODE> members that is defined with the WEAK symbol in the system, it is useful for the application to define the array itself. Because <CODE>resourceArray[]</CODE> is an array of resource arrays, it can specify a number of necessary resource arrays all at once.</P> 30<P><FONT color="#ff0000">When describing a resource array, be sure to place an <CODE>ENV_RESOURCE_END</CODE> at the end.</FONT></P> 31<P>Multiple arrays can be joined together into a list and retained inside the system. (The maximum number of arrays is <CODE>ENV_RESOURCE_SET_MAX</CODE>.) When multiple arrays are kept, searches are performed on all of them. The <A href="ENV_SetResourceSet.html"><CODE>ENV_SetResourceSet</CODE></A>, <A href="ENV_AppendResourceSet.html"><CODE>ENV_AppendResourceSet</CODE></A>, <A href="ENV_PrependResourceSet.html"><CODE>ENV_PrependResourceSet</CODE></A>, and <A href="ENV_InsertResourceSet.html"><CODE>ENV_InsertResourceSet</CODE></A> functions manipulate the list.</P> 32<P>Here is an example of the description of <CODE>resourceArray[]</CODE>.</P> 33<BLOCKQUOTE style="background-color:#ffffcc"><CODE><B>(Example)</B><BR> <BR> ENVResource myResource1[] = {<BR> "res1.data1", ENV_U32( 300 ),<BR> "res1.data2", ENV_STRING( "abcde" ),<BR> "res1.data3", ENV_S32( -100 ),<BR> <B>ENV_RESOUCE_END</B><BR> };<BR> <BR> ENVResource myResource2[] = {<BR> "res2.data1", ENV_U32( 500 ),<BR> "res2.data2", ENV_S32( -800 ),<BR> <B>ENV_RESOUCE_END</B><BR> };<BR> <BR> 34 35ENVResource* resourceArray[]={ myResource1, myResource2, NULL };</CODE><BR> <BR> 36</BLOCKQUOTE> 37<P><BR> You should call the <CODE>ENV_Init</CODE> function before calling any other ENV functions. It cannot be called from the <A href="../os/init/OS_Init.html"><CODE>OS_Init</CODE></A> function.</P> 38<H2>See Also</H2> 39<P><A href="ENV_SetResourceSetArray.html"><CODE>ENV_SetResourceSetArray</CODE></A><BR> <A href="ENV_SetResourceSet.html"><CODE>ENV_SetResourceSet</CODE></A><BR> <A href="ENV_AppendResourceSet.html"><CODE>ENV_AppendResourceSet</CODE></A><BR> <A href="ENV_PrependResourceSet.html"><CODE>ENV_PrependResourceSet</CODE></A><BR> <A href="ENV_InsertResourceSet.html"><CODE>ENV_InsertResourceSet</CODE></A><BR> <A href="ENV_GetXXX.html"><CODE>ENV_Get*</CODE></A></P> 40<H2>Revision History</H2> 41<P>2008/12/19 Added example.<BR> 2005/08/29 Added text about multiple arrays.<BR> 2005/08/16 Initial version</P> 42<hr><p>CONFIDENTIAL</p></body> 43</HTML> 44