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>CARDRead</title> 10</head> 11 12<body> 13 14<h1>CARDRead</h1> 15 16 17<h2>C Specification</h2> 18<DL> 19 <DD> 20<PRE><code>#include <revolution/card.h> 21 22#define CARD_READ_SIZE 512</code></PRE> 23 24 <DD> 25<PRE><CODE>s32 CARDRead(CARDFileInfo* fileInfo, void* buf, s32 length, s32 offset);</CODE></PRE> 26 27</DL> 28<h2>Arguments</h2> 29<TABLE border="1" cellpadding="3" cellspacing="0.1"> 30 <tr> 31<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>fileInfo</code></strong></em></code></strong></em></TD> 32<TD width="520">Pointer to the file information of the file to read. <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> 33 </tr> 34 <tr> 35<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>buf</code></strong></em></code></strong></em></TD> 36<TD width="520">Buffer address (32-byte alignment).</TD> 37 </tr> 38 <tr> 39<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>length</code></strong></em></code></strong></em></TD> 40<TD width="520">Number of bytes to read (multiple of <code>CARD_READ_SIZE</code>).</TD> 41 </tr> 42 <tr> 43<TD width="120" bgcolor="#ffffe8"><em><strong><code><em><strong><code>offset</code></strong></em></code></strong></em></TD> 44<TD width="520">The position of the file to start read (multiple of <code>CARD_READ_SIZE</code>).</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_LIMIT<br> CARD_RESULT_CANCELED<br> CARD_RESULT_READY</code></p> 52<H2>Description</H2> 53<P>Synchronously reads data from a file.</P> 54<h2>See Also</h2> 55<P> 56<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> 57</P> 58 59<H2>Revision History</H2> 60<P>03/01/2006 Initial version.</P> 61</body> 62</html> 63