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>VFWriteFile</title>
9</head>
10
11<body>
12
13<h1>VFWriteFile</h1>
14
15<h2>C Specification</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/vf.h&gt;
18
19typedef void	VFFile;
20typedef s32	VFErr;
21
22VFErr VFWriteFile( VFFile* file, void* buf, u32 size );
23</code></pre></dd></dl>
24
25<h2>Arguments</h2>
26<p>
27<TABLE border="1" >
28  <tr>
29<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>file</EM></STRONG></CODE></TD>
30<TD width="520">A pointer to the file descriptor.</TD>
31  </tr>
32  <tr>
33<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>buf</EM></STRONG></CODE></TD>
34<TD width="520">A pointer to the storage region for writing data.</TD>
35  </tr>
36  <tr>
37<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>size</EM></STRONG></CODE></TD>
38<TD width="520">The number of bytes of data to write.<BR>
39  </tr>
40</TABLE>
41</p>
42
43<h2>Return Values</h2>
44<PRE>
45Returns 0 when successful
46Otherwise, returns <code><a href="./VFErr.html">VFErr</a></code> other than 0
47</PRE>
48
49
50<H2>Description</H2>
51<p>
52Writes data to an open file. Returns an error (<CODE>VF_ERR_ENOSPC</CODE>) when there is no more space available to write.<BR><br><B>Note:</B> Operations cannot be guaranteed if you have specified access to an invalid region because an address check for <I><B>buf</B></I> (the pointer to the buffer) is not performed if the pointer is not a NULL pointer.<br>A write will not take place if the data size is 4 GB or greater. In that case, only the first 4 GB of data will be written.
53</p>
54
55<h2>See Also</h2>
56<p>
57<code><a href="./VFCreateFile.html">VFCreateFile</a></code>, <code><a href="./VFOpenFile.html">VFOpenFile</a></code>, <code><a href="./VFSeekFile.html">VFSeekFile</a></code>, <code><a href="./VFReadFile.html">VFReadFile</a></code>, <code><a href="./VFCloseFile.html">VFCloseFile</a></code>, <code><a href="./VFDeleteFile.html">VFDeleteFile</a></code>
58</p>
59
60<H2>Revision History</H2>
61<p>
622006/04/26<br>2007/05/08 Corrected errors.
63</p>
64
65
66<hr><p>CONFIDENTIAL</p></body>
67</html>
68