1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>CNTSeek</title>
9</head>
10
11<body>
12
13<h1>CNTSeek</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/cnt.h&gt;
18
19s32 CNTSeek(CNTFileInfo* cf, s32 offset, u32 whence);
20</code></pre></dd></dl>
21
22<h2>Arguments</h2>
23<p>
24<TABLE border="1" >
25  <tr>
26<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>cf</EM></STRONG></CODE></TD>
27<TD width="520">Pointer to the <CODE>CNTFileInfo</CODE> structure.</TD>
28  </tr>
29  <tr>
30<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>offset</EM></STRONG></CODE></TD>
31<TD width="520">Offset value. Units are bytes. Must be a multiple of 4.</TD>
32  </tr>
33  <tr>
34<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>whence</EM></STRONG></CODE></TD>
35<TD width="520">Specifies the seek base position.
36        <table border="1" cellspacing="0.1" width="400">
37          <tr>
38<td width="150"><code>CNT_SEEK_SET</code></td>
39<td>Start of file.</td>
40          </tr>
41          <tr>
42<td width="150"><code>CNT_SEEK_CUR</code></td>
43<td>Current position of file.</td>
44          </tr>
45          <tr>
46<td width="150"><code>CNT_SEEK_END</code></td>
47<td>End of file.</td>
48          </tr>
49        </table>
50    </TD>
51  </tr>
52</TABLE>
53</p>
54
55<h2>Return Values</h2>
56<p>
57Returns <code>CNT_RESULT_OK</code> when the process ends normally. Returns <code>CNT_RESULT_INVALID</code> if a parameter is supplied that indicates a position not in the file, or if a value other than those listed above is supplied as the value of <CODE><STRONG><EM>whence</EM></STRONG></CODE>.<br>
58</p>
59
60
61<H2>Description</H2>
62<p>
63Moves the start location for loading the file.<br>
64</p>
65
66<h2>See Also</h2>
67<p>
68<code><a href="./CNTOpen.html">CNTOpen</a></code>,
69<code><a href="./CNTRead.html">CNTRead</a></code>
70</p>
71<H2>Revision History</H2>
72<p>
732006/12/04 Added result code descriptions.<br>2006/09/20 Added a description about the restrictions when specifying <CODE><STRONG><EM>offset</EM></STRONG></CODE>.<br>2006/08/15 Initial version.
74</p>
75
76
77<hr><p>CONFIDENTIAL</p></body>
78</html>
79