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>DWCNdCallback</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13<a name="dwc__nd_8h_13ab334b8de8158333fe68797a4031d04"></a> 14<h1 align="left">DWCNdCallback</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <dwc.h></CODE><BR> 20 <BR> 21 <PRE><CODE>typedef void(*) <a href=DWCNdCallback.html#dwc__nd_8h_13ab334b8de8158333fe68797a4031d04>DWCNdCallback</a>(<a href=Macro.html#dwc__nd_8h_12589cc4824e67625368ff4b3b6353087>DWCNdCallbackReason</a> reason, 22 <a href=Macro.html#dwc__nd_8h_15516f9a01edfa95b9587f88bfdbd9f61>DWCNdError</a> error, 23 int servererror);</CODE></PRE></dd> 24</dl> 25 26<h2>Arguments</h2> 27 28<TABLE border="1" width="100%"> 29 <TBODY> 30 31 <TR> 32<TD width="13%"><EM><STRONG><parametername>reason</parametername></STRONG></EM></TD> 33 <TD width="87%">Indicates the type of process that was running when the notification callback function was called.</TD> 34 </TR> 35 36 <TR> 37<TD width="13%"><EM><STRONG><parametername>error</parametername></STRONG></EM></TD> 38 <TD width="87%">Indicates the error generated when the notification callback function was called.</TD> 39 </TR> 40 41 <TR> 42<TD width="13%"><EM><STRONG><parametername>servererror</parametername></STRONG></EM></TD> 43 <TD width="87%">Error code notified from the server.<br>Takes -1 if the <CODE>error</CODE> value is not <a href=Macro.html#dwc__nd_8h_15516f9a01edfa95b9587f88bfdbd9f611664b66e43e076177f2113d69dc449e1><CODE>DWC_ND_ERROR_DLSERVER</CODE></a>.</TD> 44 </TR> 45 46 </TBODY> 47</TABLE> 48 49<h2>Return Values</h2> 50 51<p>None.</p> 52 53<H2>Description</H2> 54<p>This is the type for notification callback functions that are called by the Download library. It communicates the result of the asynchronous process. Handle errors using what's more convenient: either the <CODE>error</CODE> parameter of this callback or the value returned by the <a href=DWC_NdProcess.html#dwc__nd_8h_1b38515d259a11713e7552ee183b7e55e><CODE>DWC_NdProcess</CODE></a> function. If <a href=DWC_NdProcess.html#dwc__nd_8h_1b38515d259a11713e7552ee183b7e55e><CODE>DWC_NdProcess</CODE></a>'s return value is <a href=Macro.html#dwc__nd_8h_16dd63254afcd3d1cc5f3a7851c0c8ef1b92898ee1b47439262313646f2fe46ee><CODE>DWC_ND_STATE_COMPLETE</CODE></a>, the <CODE>error</CODE> parameter of this callback becomes <a href=Macro.html#dwc__nd_8h_15516f9a01edfa95b9587f88bfdbd9f613afc2fa5c21e4f49592cce997a16cace><CODE>DWC_ND_ERROR_NONE</CODE></a>. If <a href=DWC_NdProcess.html#dwc__nd_8h_1b38515d259a11713e7552ee183b7e55e><CODE>DWC_NdProcess</CODE></a>'s return value is <a href=Macro.html#dwc__nd_8h_16dd63254afcd3d1cc5f3a7851c0c8ef18e7a759f648afeb1195a22d035819d07><CODE>DWC_ND_STATE_ERROR</CODE></a>, the <CODE>error</CODE> parameter of this callback takes something other than <a href=Macro.html#dwc__nd_8h_15516f9a01edfa95b9587f88bfdbd9f613afc2fa5c21e4f49592cce997a16cace><CODE>DWC_ND_ERROR_NONE</CODE></a>. In this case, get error information using the <a href=DWC_GetLastErrorEx.html#dwc__error_8h_118bd79f5d5151259c19c4e552e5e633b><CODE>DWC_GetLastErrorEx</CODE></a> function, display the error code and error message that corresponds to the error process type, and quit the library.</p><p>Download library functions can be called from inside this callback.</p> 55 56<h2>See Also</h2> 57<p> 58 59<CODE><A href="DWC_NdInitAsync.html">DWC_NdInitAsync</A></CODE> 60 61<CODE><A href="DWC_NdCleanupAsync.html">DWC_NdCleanupAsync</A></CODE> 62 63</p> 64 65<H2>Revision History</H2> 66<DL> 67 68<DT><para>1.4.15</DT> 69<DD>Initial version.</DD> 70 71</DL> 72<hr><p>CONFIDENTIAL</p></body> 73</html> 74