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 <nitro/os.h></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><SPAN class="argument">n</SPAN></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 32<P>Retrieves the argument string that has the specified index from the argument data embedded in the ROM file.</P> 33<P>For NITRO ROMs, arguments are embedded as argument data in the ROM file with the <A href="../../tools/buryarg.html"><CODE>buryarg</CODE></A> tool. For TWL ROMs, arguments are embedded as argument data in the ROM file with the <A href="../../tools/buryarg.html"><CODE>buryarg.TWL</CODE></A> tool. This function gets a pointer to the string with the specified index in 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/buryarg.html"><CODE>buryarg.TWL</CODE></A> was run) corresponds to index 0, the first argument is the data in index 1, the second argument is the data in index 2, and so on.</P> 34<P>If you specify a value for <SPAN class="argument">n</SPAN> 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> 35<P><FONT color="#ff0000">This function always returns <CODE>NULL</CODE> for FINALROM builds, regardless of the value specified for <SPAN class="argument">n</SPAN>.</FONT></P> 36<P>Example:</P> 37<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> 38<H2>See Also</H2> 39<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/buryarg.html"><CODE>buryarg.TWL</CODE> Tool</A></P> 40<H2>Revision History</H2> 41<P>2008/06/23 Split into separate cases for NITRO and TWL.<BR>2005/07/21 Initial version.</P> 42<hr><p>CONFIDENTIAL</p></body> 43</HTML>