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 name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
9<title>CARDWrite</title>
10</head>
11
12<body>
13
14<h1>CARDWrite</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><pre><code>#include &lt;revolution/card.h&gt;</CODE></pre></dd>
21<dd><pre>s32 CARDWrite(CARDFileInfo* fileInfo, const void* buf, s32 length, s32 offset);
22</CODE></pre></dd>
23</dl><h2>Arguments</h2>
24<TABLE border="1" cellpadding="3" cellspacing="0.1">
25  <tr>
26<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>fileInfo</code></strong></em></code></strong></em></TD>
27<TD width="520">Pointer to the file info of the file to write. <code><em><strong>fileInfo</strong></em></code> must be valid file info that was initialized using the <code><a href="CARDOpen.html">CARD</a><a href="CARDFastOpen.html">[Fast]</a><a href="CARDOpen.html">Open</a></code> or <code><a href="CARDCreate.html">CARDCreate</a><a href="CARDCreateAsync.html">[Async]</a></code> function.</TD>
28    </tr>
29  <tr>
30<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>buf</code></strong></em></code></strong></em></TD>
31<TD width="520">Buffer address (32-byte alignment).</TD>
32    </tr>
33  <tr>
34<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>length</code></strong></em></code></strong></em></TD>
35<TD width="520">Number of bytes to write. The length must be a multiple of the card sector size returned by the <code><a href="CARDGetSectorSize.html">CARDGetSectorSize</a></code> function.</TD>
36    </tr>
37  <tr>
38<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>offset</code></strong></em></code></strong></em></TD>
39<TD width="520">The position of the file to start write. The offset must be a multiple of the card sector size returned by the <code><a href="CARDGetSectorSize.html">CARDGetSectorSize</a></code> function.</TD>
40    </tr>
41</TABLE>
42<h2>Return Values</h2>
43
44<p>One of the following codes:</p>
45
46<p><code>CARD_RESULT_FATAL_ERROR<br> CARD_RESULT_NOCARD<br> CARD_RESULT_BUSY<br> CARD_RESULT_NOFILE<br> CARD_RESULT_NOPERM<br> CARD_RESULT_IOERROR<br> CARD_RESULT_LIMIT<br> CARD_RESULT_CANCELED<br> CARD_RESULT_READY</code></p>
47<H2>Description</H2>
48<P>Synchronously writes data to a file.</P>
49<P><STRONG>Note:</STRONG>
50This function is provided for debugging. Do not use in programs.</P>
51<h2>See Also</h2>
52<P>
53<code><a href="CARDOpen.html">CARD</a><a href="CARDFastOpen.html">[Fast]</a><a href="CARDOpen.html">Open</a></code>, <code><a href="CARDCreate.html">CARDCreate</a><a href="CARDCreateAsync.html">[Async]</a></code>, <code><a href="CARDCancel.html">CARDCancel</a></code>, <code><a href="CARDGetResultCode.html">CARDGetResultCode</a></code>, <a href="CARDGetSectorSize.html"><code>CARDGetSectorSize</code></a>
54</P>
55<H2>Revision History</H2>
56<P>03/01/2006 Initial version.</P>
57</body>
58</html>
59