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>CARDWriteAsync</title> 10</head> 11 12<body> 13 14<h1>CARDWriteAsync</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><code>#include <revolution/card.h> 20 21typedef void (*CARDCallback)( s32 chan, s32 result );</code></pre></dd> 22<dd><pre>s32 CARDWriteAsync( CARDFileInfo* fileInfo, const void* buf, s32 length, s32 offset, 23CARDCallback callback );</pre></dd> 24</dl><h2>Arguments</h2> 25<TABLE border="1" cellpadding="3" cellspacing="0.1"> 26 <tr> 27<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>fileInfo</code></strong></em></code></strong></em></TD> 28<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> 29 </tr> 30 <tr> 31<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>buf</code></strong></em></code></strong></em></TD> 32<TD width="520">Buffer address (32-byte alignment).</TD> 33 </tr> 34 <tr> 35<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>length</code></strong></em></code></strong></em></TD> 36<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> 37 </tr> 38 <tr> 39<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>offset</code></strong></em></code></strong></em></TD> 40<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> 41 </tr> 42 <tr> 43<TD width="120" bgcolor="#ffffe8"><em><strong><code><EM><STRONG><CODE>callback</CODE></STRONG></EM></code></strong></em></TD> 44<TD width="520">Callback function to notify about the result.</TD> 45 </tr> 46</TABLE> 47<h2>Return Values</h2> 48 49<P>One of the following codes:</P> 50 51<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> 52<H2>Description</H2> 53<P>Asynchronously writes data to a file.</P> 54 55<h2>See Also</h2> 56<P> 57<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></P> 58<H2>Revision History</H2> 59<P>2006/03/01 Initial version.</P> 60<hr> 61<P>CONFIDENTIAL</p> 62</BODY> 63</HTML> 64