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>CARDReadAsync</title>
10</head>
11
12<body>
13
14<h1>CARDReadAsync</h1>
15
16
17<h2>C Specification</h2>
18<DL>
19  <DD>
20<PRE><code>#include &lt;revolution/card.h&gt;
21
22#define CARD_READ_SIZE      512
23
24typedef void (*CARDCallback)( s32 chan, s32 result );</code></PRE>
25
26  <DD>
27<PRE>s32 CARDReadAsync(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset,
28CARDCallback callback );</PRE>
29
30</DL>
31<h2>Arguments</h2>
32<TABLE border="1" cellpadding="3" cellspacing="0.1">
33  <tr>
34<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>fileInfo</code></strong></em></code></strong></em></TD>
35<TD width="520">Pointer to the file info of the file to read. <code><em><strong>fileInfo</strong></em></code> must be valid file info initialized with 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>
36    </tr>
37  <tr>
38<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>buf</code></strong></em></code></strong></em></TD>
39<TD width="520">Buffer address (32-byte alignment).</TD>
40    </tr>
41  <tr>
42<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>length</code></strong></em></code></strong></em></TD>
43<TD width="520">Number of bytes to read (multiple of <code>CARD_READ_SIZE</code>).</TD>
44    </tr>
45  <tr>
46<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>offset</code></strong></em></code></strong></em></TD>
47<TD width="520">The position of the file to start read (multiple of <code>CARD_READ_SIZE</code>).</TD>
48    </tr>
49  <tr>
50<TD width="120" bgcolor="#ffffe8"><em><strong><code><EM><STRONG><CODE>callback</CODE></STRONG></EM></code></strong></em></TD>
51<TD width="520">Callback function to notify about the result.</TD>
52    </tr>
53</TABLE>
54<h2>Return Values</h2>
55
56<p>One of the following codes:</p>
57
58<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_LIMIT<br> CARD_RESULT_CANCELED<br> CARD_RESULT_READY</code></p>
59<H2>Description</H2>
60<P>Asynchronously reads data from a file.</P>
61<h2>See Also</h2>
62<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>
63
64<H2>Revision History</H2>
65<P>03/01/2006 Initial version.</P>
66</body>
67</html>
68