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 http-equiv="Content-Style-Type" content="text/css"> 7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 8<title>DWC_GdbDownloadFileAsync</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13<a name="dwc__gdb_8h_1ec9c42c94fd2891995d1778d7f8af9af"></a> 14<h1 align="left">DWC_GdbDownloadFileAsync</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <dwc.h></CODE><BR> 20 <BR> 21 <PRE><CODE><a href=Macro.html#dwc__gdb_8h_1cb77329e259246f72c99a77edee22a86>DWCGdbError</a> <a href=DWC_GdbDownloadFileAsync.html#dwc__gdb_8h_1ec9c42c94fd2891995d1778d7f8af9af>DWC_GdbDownloadFileAsync</a>(int file_id, 22 int buf_size, 23 BOOL clear_buf, 24 <a href=DWCGdbDownloadFileCallback.html#dwc__gdb_8h_1659e238c0c880dcd74d1bdd420dc377a>DWCGdbDownloadFileCallback</a> callback, 25 void *user_param);</CODE></PRE></dd> 26</dl> 27 28<h2>Arguments</h2> 29 30<TABLE border="1" width="100%"> 31 <TBODY> 32 33 <TR> 34<TD width="13%"><EM><STRONG>file_id</STRONG></EM></TD> 35<TD width="87%">The file ID of the file to get.</TD> 36 </TR> 37 38 <TR> 39<TD width="13%"><EM><STRONG>buf_size</STRONG></EM></TD> 40<TD width="87%">Specifies the size of the receive buffer that will store the file being downloaded. When 0 is specified, the size will be enlarged in 2048-byte units. Because this has a heavy processing burden, it is optimal to specify a size here if you know the maximum size in advance.</TD> 41 </TR> 42 43 <TR> 44<TD width="13%"><EM><STRONG>clear_buf</STRONG></EM></TD> 45<TD width="87%">Indicates whether to deallocate the receive buffer after the callback ends.</TD> 46 </TR> 47 48 <TR> 49<TD width="13%"><EM><STRONG>callback</STRONG></EM></TD> 50<TD width="87%">The callback that receives the downloaded file.</TD> 51 </TR> 52 53 <TR> 54<TD width="13%"><EM><STRONG>user_param</STRONG></EM></TD> 55<TD width="87%">Arbitrary value passed to the callback.</TD> 56 </TR> 57 58 </TBODY> 59</TABLE> 60 61<h2>Return Values</h2> 62 63<p>Error information.</p> 64 65<H2>Description</H2> 66<p>If the process is successful, the callback function specified by the <CODE>callback</CODE> argument is called and the file with the ID specified by <CODE>file_id</CODE> is obtained. Be aware that if the process fails, the callback will not be called.</p><p>If the <a href=Macro.html#dwc__gdb_8h_1cb77329e259246f72c99a77edee22a86e9779fbe6ad274d2016ee2ab66a08582><CODE>DWC_GDB_ERROR_NONE</CODE></a> value is returned, the asynchronous process has started. Wait until the <a href=DWC_GdbGetState.html#dwc__gdb_8h_1369bfca6c2cd6e2e2893c03c94a5e2db><CODE>DWC_GdbGetState</CODE></a> function stops returning <a href=Macro.html#dwc__gdb_8h_1eb0cda4da19d6df37e71df9d0de849eb605bb3a74ef4c38439052c43bdae07ce><CODE>DWC_GDB_STATE_IN_ASYNC_PROCESS</CODE></a>.</p><p>You can get the result using the <a href=DWC_GdbGetAsyncResult.html#dwc__gdb_8h_1f700899219d0635bc4e4430fa9b7e840><CODE>DWC_GdbGetAsyncResult</CODE></a> function.</p> 67 68<H2>Revision History</H2> 69<DL> 70 71</DL> 72<hr><p>CONFIDENTIAL</p></body> 73</html> 74