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>OS_GetArgv</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_GetArgv <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/os.h&gt;</CODE></PRE>
16  <PRE><CODE>cosnt char* OS_GetArgv( int n );
17 </CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<TABLE border="1">
21  <TBODY>
22    <TR>
23<TD><CODE>n</CODE></TD>
24<TD>Index number of the argument string to be retrieved</TD>
25    </TR>
26  </TBODY>
27</TABLE>
28<H2>Return Values</H2>
29<P>The pointer to the current argument string.</P>
30<H2>Description</H2>
31<P>Retrieves the argument string that has the specified index from the argument data embedded in the ROM file.</P>
32<P>For NITRO ROMs, arguments are embedded as argument data in the ROM file using the <A href="../../tools/buryarg.html"><CODE>buryarg</CODE></A> tool. For TWL ROMs, arguments are embedded as argument data in the ROM file using the <A href="../../tools/buryargTWL.html"><CODE>buryarg.TWL</CODE></A> tool. This function is used to get a pointer to the string having the specified index within these arguments. The program name (the name of the ROM file specified when either <A href="../../tools/buryarg.html"><CODE>buryarg</CODE></A> or <A href="../../tools/buryargTWL.html"><CODE>buryarg.TWL</CODE></A> was run) will correspond to index 0; the first argument will be the data in index 1, the second argument will be the data in index 2, and so on.</P>
33<P>If you specify a value for <CODE>n</CODE> that is greater than any value that the <A href="OS_GetArgc.html"><CODE>OS_GetArgc</CODE></A> function can get, this function returns <CODE>NULL</CODE>. If you specify a negative number, operations are undefined.</P>
34<P><FONT color="#ff0000">This function always returns <CODE>NULL</CODE> for FINALROM builds, regardless of the value specified for <CODE>n</CODE>.</FONT></P>
35<P>Example:</P>
36<BLOCKQUOTE style="background-color:#ffffc0">      If <CODE>buryarg main.srl test 1 2 3</CODE> is specified, the result will be as follows:<BR> <BR> <CODE>        OS_GetArgc() ... 4<BR> OS_GetArgv( 0 ) ... main.srl<BR> OS_GetArgv( 1 ) ... test<BR> OS_GetArgv( 2 ) ... 1<BR> OS_GetArgv( 3 ) ... 2<BR> OS_GetArgv( 4 ) ... 3<BR> OS_GetArgv( 5 ) ... NULL</CODE><BR><BR>( The same is true with <CODE>buryarg.TWL</CODE>.)</BLOCKQUOTE>
37<H2>See Also</H2>
38<P><A href="OS_GetArgc.html"><CODE>OS_GetArgc</CODE></A><BR> <A href="OS_GetOpt.html"><CODE>OS_GetOpt</CODE></A><BR> <A href="../../tools/buryarg.html"><CODE>buryarg</CODE> Tool</A><BR> <A href="../../tools/buryargTWL.html"><CODE>buryarg.TWL</CODE> Tool</A></P>
39<H2>Revision History</H2>
40<P>2008/06/23 Split into separate cases for NITRO and TWL.<BR>2005/07/21 Initial version.</P>
41<hr><p>CONFIDENTIAL</p></body>
42</HTML>