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 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>FS_WriteFileAsync</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">FS_WriteFileAsync <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/fs.h></CODE><BR> <BR> <CODE>s32 FS_WriteFileAsync(<A href="../fs_file_type.html">FSFile</a>* p_file, const void *src, s32 len);</CODE><br> <br> 20 </dd> 21</dl> 22<h2>Arguments</h2> 23<TABLE border="1" width="100%"> 24 <TBODY> 25 <TR> 26<TD width="13%"><EM><STRONG>p_file</STRONG></EM></TD> 27<TD width="87%">Address of the <A href="../fs_file_type.html"><CODE>FSFile</CODE></A> structure.</TD> 28 </TR> 29 <TR> 30<TD width="13%"><EM><STRONG>src</STRONG></EM></TD> 31<TD width="87%">Address of the buffer that stores the write data.</TD> 32 </TR> 33 <TR> 34<TD width="13%"><EM><STRONG>len</STRONG></EM></TD> 35<TD width="87%">Byte length of data to be written.</TD> 36 </TR> 37 </TBODY> 38</TABLE> 39 40<h2>Return Values</h2> 41<p>Returns the number of bytes if the data can be written properly. If not, returns <code>-1</code>.</p> 42 43<H2>Description</H2> 44<P>This function asynchronously writes data of the specified size beginning at the current location of the file pointer. When the specified size is greater than the available memory, data is written until the available memory is used up. The size of the written data is returned. Unlike the <code><a href="FS_WriteFile.html">FS_WriteFile</a></code> function, it returns the control immediately and starts the asynchronous execution. Use the <code><a href="FS_IsBusy.html">FS_IsBusy</a></code> function to confirm the completion of the process. Alternatively, use the <code><a href="FS_WaitAsync.html">FS_WaitAsync</a></code> function to wait for the completion. <BR> 45</P> 46<H2>Note</H2> 47<p><font color="#800000">If the archive cannot run the process asynchronously, this function becomes a synchronous process, just like <a href="FS_ReadFile.html"><code>FS_ReadFile</code></a>. For such archives, this function cannot be called from the interrupt handler (IRQ mode). The process may not be completed if interrupts are prohibited.<br></font></p> 48<BR> 49<h2>See Also</h2> 50<p><CODE><A href="../fs_file_type.html">FSFile</A> <br> <A href="FS_WriteFile.html">FS_WriteFile</A><BR> <A href="FS_IsBusy.html">FS_IsBusy</A><BR> <A href="FS_WaitAsync.html">FS_WaitAsync</A><BR> <A href="FS_GetFileLength.html">FS_GetFileLength</A><BR> <A href="FS_GetFilePosition.html">FS_GetFilePosition</A><BR> <A href="FS_SeekFile.html">FS_SeekFile</A><BR> <A href="FS_SeekFileToBegin.html">FS_SeekFileToBegin</A><BR> <A href="FS_SeekFileToEnd.html">FS_SeekFileToEnd</A></CODE></p> 51 52<H2>Revision History</H2> 53<P> 542008/10/02 Updated the See Also list.<br>2004/11/02 Corrected argument description.<br /> 2004/09/24 Added text under Note regarding the conditions for calling this function.<br /> 2004/07/13 Initial version. 55</P> 56<hr><p>CONFIDENTIAL</p></body> 57</html> 58