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"><PRE><FONT color="#ff0000">SDK_WEAK_SYMBOL</FONT> ENVResource *<FONT color="#ff0000">resourceArray</FONT>[] = { NULL }; 27 28void ENV_Init(void) 29{ 30 : 31 <FONT color="#ff0000">ENV_SetResourceSetArray( resourceArray );</FONT> 32}</PRE></BLOCKQUOTE> 33 34<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> 35<P><FONT color="#ff0000">When describing a resource array, be sure to place an <CODE>ENV_RESOURCE_END</CODE> at the end.</FONT></P> 36<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 37<A href="ENV_SetResourceSet.html"><CODE>ENV_SetResourceSet</CODE></A>, 38<A href="ENV_AppendResourceSet.html"><CODE>ENV_AppendResourceSet</CODE></A>, 39<A href="ENV_PrependResourceSet.html"><CODE>ENV_PrependResourceSet</CODE></A>, and 40<A href="ENV_InsertResourceSet.html"><CODE>ENV_InsertResourceSet</CODE></A> functions manipulate the list.</P> 41 42<P>Here is an example of the description of <CODE>resourceArray[]</CODE>.</P> 43 44<BLOCKQUOTE style="background-color:#ffffcc"><PRE><B>(Example)</B> 45 46ENVResource myResource1[] = { 47 "res1.data1", ENV_U32( 300 ), 48 "res1.data2", ENV_STRING( "abcde" ), 49 "res1.data3", ENV_S32( -100 ), 50 <B><FONT color="#ff0033">ENV_RESOURCE_END</FONT></B> 51}; 52 53ENVResource myResource2[] = { 54 "res2.data1", ENV_U32( 500 ), 55 "res2.data2", ENV_S32( -800 ), 56 <B><FONT color="#ff0033">ENV_RESOURCE_END</FONT></B> 57}; 58 59ENVResource* resourceArray[]={ myResource1, myResource2, NULL };</PRE> 60</BLOCKQUOTE> 61<P><BR> 62You 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> 63<H2>See Also</H2> 64<P><A href="ENV_SetResourceSetArray.html"><CODE>ENV_SetResourceSetArray</CODE></A><BR> 65<A href="ENV_SetResourceSet.html"><CODE>ENV_SetResourceSet</CODE></A><BR> 66<A href="ENV_AppendResourceSet.html"><CODE>ENV_AppendResourceSet</CODE></A><BR> 67<A href="ENV_PrependResourceSet.html"><CODE>ENV_PrependResourceSet</CODE></A><BR> 68<A href="ENV_InsertResourceSet.html"><CODE>ENV_InsertResourceSet</CODE></A><BR> 69<A href="ENV_GetXXX.html"><CODE>ENV_Get*</CODE></A></P> 70<H2>Revision History</H2> 71<P>2008/12/19 Added example.<BR> 722005/08/29 Added text about multiple arrays.<BR> 732005/08/16 Initial version</P> 74<hr><p>CONFIDENTIAL</p></body> 75</HTML> 76