UINT (*<spanclass="arg">func</span>)(const BYTE*,UINT), <spanclass="c">/* [IN] Data streaming function */</span>
UINT <spanclass="arg">btf</span>, <spanclass="c">/* [IN] Number of bytes to forward */</span>
UINT* <spanclass="arg">bf</span><spanclass="c">/* [OUT] Number of bytes forwarded */</span>
);
</pre>
</div>
<divclass="para arg">
<h4>Parameters</h4>
<dlclass="par">
<dt>fp</dt>
<dd>Pointer to the open file object.</dd>
<dt>func</dt>
<dd>Pointer to the user-defined data streaming function. For details, refer to the sample code.</dd>
<dt>btf</dt>
<dd>Number of bytes to forward in range of <tt>UINT</tt>.</dd>
<dt>bf</dt>
<dd>Pointer to the <tt>UINT</tt> variable to return number of bytes forwarded.</dd>
</dl>
</div>
<divclass="para ret">
<h4>Return Values</h4>
<p>
<ahref="rc.html#ok">FR_OK</a>,
<ahref="rc.html#de">FR_DISK_ERR</a>,
<ahref="rc.html#ie">FR_INT_ERR</a>,
<ahref="rc.html#nr">FR_NOT_READY</a>,
<ahref="rc.html#io">FR_INVALID_OBJECT</a>,
<ahref="rc.html#tm">FR_TIMEOUT</a>
</p>
</div>
<divclass="para desc">
<h4>Description</h4>
<p>The <tt>f_forward()</tt> function reads the data from the file and forward it to the outgoing stream without data buffer. This is suitable for small memory system because it does not require any data buffer at application module. The file pointer of the file object increases in number of bytes forwarded. In case of <ttclass="arg">*bf</tt> is less than <ttclass="arg">btf</tt> without error, it means the requested bytes could not be transferred due to end of file or stream goes busy during data transfer.</p>
</div>
<divclass="para comp">
<h4>QuickInfo</h4>
<p>Available when <tt>_USE_FORWARD == 1</tt> and <tt>_FS_TINY == 1</tt>.</p>