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_GetSize</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">ENV_GetSize <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>int ENV_GetSize( const char* name ); 17 </CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" width="100%"> 21 <TBODY> 22 <TR> 23<TD width=20%><SPAN class="argument">name</SPAN></TD> 24<TD>Pointer to the resource name. If this string begins with "<CODE>.</CODE>" (period), the class name is considered to be omitted, and the current class is filled in before that period.</TD> 25 </TR> 26 </TBODY> 27</TABLE> 28<H2>Return Values</H2> 29<P>Gets the size of the resource.</P> 30<H2>Description</H2> 31<P>Gets the size of the designated resource.</P> 32<P>Be aware that end marks in the string are also counted for the resource size of the string defined with <CODE>ENV_STRING</CODE>. For the resource size of the string defined with <CODE>ENV_BINARY</CODE>, end marks in the string are not counted. For example:</P> 33<BLOCKQUOTE style="background-color:#ffffcc"><CODE>ENVResource myResource[] = {<BR> "class.s1", ENV_STRING( "abcdef" ),<BR> "class.b1", ENV_BINARY( "abcdef" ),<BR> <BR> "class.s2", ENV_STRING( "\0\0\0" ),<BR> "class.b2", ENV_BINARY( "\0\0\0" ),<BR> <BR> "class,val1", ENV_U32( 10000 ),<BR> <BR> ENV_RESOURCE_END // End mark<BR> };<BR></CODE></BLOCKQUOTE> 34<P>For resource groups such as the one above:</P> 35<P><CODE>ENV_GetSize( "class.s1" )</CODE> has a size of 7.<BR><CODE>ENV_GetSize( "class.b1" )</CODE> has a size of 6.<BR>For reference, <CODE>sizeof( "abcdef" )</CODE> has a size of 7. <CODE>strlen( "abcdef" )</CODE> has a size of 6.</P> 36<P><CODE>ENV_GetSize( "class.s1" )</CODE> has a size of 4.<BR><CODE>ENV_GetSize( "class.b2" )</CODE> has a size of 3.<BR>For reference, <CODE>sizeof( "\0\0\0" )</CODE> has a size of 4. <CODE>strlen( "\0\0\0" )</CODE> has a size of 0.</P> 37<P><CODE>ENV_GetSize( "class.val1" )</CODE> has a size of 4.</P> 38<H2>See Also</H2> 39<P><A href="ENV_Init.html"><CODE>ENV_Init</CODE></A><BR> <A href="ENV_GetXXX.html"><CODE>ENV_Get*</CODE></A><BR> <A href="ENV_GetType.html"><CODE>ENV_GetType</CODE></A><BR> <A href="ENV_SetClass.html"><CODE>ENV_SetClass</CODE></A></P> 40<H2>Revision History</H2> 41<P>2005/08/16 Initial version.</P> 42<hr><p>CONFIDENTIAL</p></body> 43</HTML> 44