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<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>NANDSimpleSafeCloseAsync</title> 9</head> 10 11<body> 12 13<h1>NANDSimpleSafeCloseAsync</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction"> 17#include <revolution/nand.h> 18 19typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block ); 20 21s32 NANDSimpleSafeCancelAsync( NANDFileInfo *info, NANDCallback cb, NANDCommandBlock *block ); 22</pre></dd></dl> 23 24<h2>Arguments</h2> 25<p> 26<TABLE class="arguments" border="1" > 27 <tr> 28<TH>info</TH> 29<TD>Pointer to a <CODE>NANDFileInfo</CODE> structure</TD> 30 </tr> 31 <tr> 32<TH>cb</TH> 33<TD>Callback function to call when this function completes processing.</TD> 34 </tr> 35 <tr> 36<TH>block</TH> 37<TD>Command block structure to be passed to the callback function.</TD> 38 </tr> 39</TABLE> 40</p> 41 42<h2>Return Values</h2> 43<p> 44The result codes that <code>NANDSimpleSafeCancelAsync</code> can return are listed below. When the request begins normally, returns <CODE>NAND_RESULT_OK</CODE>. 45<p> 46<code> 47NAND_RESULT_OK<br> 48NAND_RESULT_ACCESS<br> 49NAND_RESULT_ALLOC_FAILED<br> 50NAND_RESULT_BUSY<br> 51NAND_RESULT_INVALID<br> 52NAND_RESULT_FATAL_ERROR<br> 53</code> 54</p> 55<p> 56The result codes that may be passed to the callback function are listed below. If the resource is deallocated normally, <code>NAND_RESULT_OK</code> is passed to the specified callback function. 57</p> 58<p> 59<code> 60NAND_RESULT_OK<br> 61NAND_RESULT_ALLOC_FAILED<br> 62NAND_RESULT_BUSY<br> 63NAND_RESULT_CORRUPT<br> 64NAND_RESULT_INVALID<br> 65NAND_RESULT_UNKNOWN<br> 66NAND_RESULT_FATAL_ERROR<br> 67</code> 68</p> 69</p> 70 71<h2>Description</h2> 72<p> 73This (asynchronous) function will try to deallocate the resources (temporary files and file descriptors) that were used by the <CODE>NANDSimpleSafe</CODE>-related functions. Call this function when any <CODE>NANDSimpleSafe</CODE>-type related function (excluding <CODE>NANDSimpleSafeCancel[Async]</CODE>) ends on a <CODE>NAND_RESULT_AUTHENTICATION</CODE> or <CODE>NAND_RESULT_CRIT</CODE> error, or when a <CODE>NAND_RESULT_AUTHENTICATION</CODE> or <CODE>NAND_RESULT_ECC_CRIT</CODE> error occurs when reading or writing a file that was opened by a <CODE>NANDSimpleSafe</CODE>-type function. For more information, see <a href="./sequence.html#sequence_2">Error Processing When Using <CODE>NANDSimpleSafe</CODE>-related Functions</a>. When <CODE>NANDSimpleSafeCancelAsync</CODE> returns an error, process the error in accordance with <a href="./sequence.html#sequence_1">Error Processing After Starting Application</a>. 74</p> 75<p> 76It is not necessary to apply <CODE>NANDSimpleSafeClose[Async]</CODE> to the <CODE>NANDFileInfo</CODE> structure passed to this function. 77</p> 78<p> 79<font color="ff0000">The callback function specified with this function may receive <CODE>NAND_RESULT_ALLOC_FAILED</CODE> or <CODE>NAND_RESULT_BUSY</CODE>.</font> 80</p> 81 82<p> 83This function updates the FAT of Wii console NAND memory. However, the FAT will not be updated if this is run when <CODE>NANDSimpleSafe</CODE>-type functions have not returned an error. 84</p> 85 86<h2>See Also</h2> 87<p class="reference"> 88<a href="./NANDSimpleSafeCancel.html">NANDSimpleSafeCancel</a>, 89<a href="./NANDSimpleSafeOpen.html">NANDSimpleSafeOpen</a>, 90<a href="./NANDSimpleSafeOpenAsync.html">NANDSimpleSafeOpenAsync</a>, 91<a href="./NANDSimpleSafeClose.html">NANDSimpleSafeClose</a>, 92<a href="./NANDSimpleSafeCloseAsync.html">NANDSimpleSafeCloseAsync</a> 93</p> 94 95<h2>Revision History</h2> 96<p> 972008/08/01 Added an explanation related to FAT updates.<br>2008/05/26 Revised the conditions for calling this function in <B>Description</B>.<br>2008/05/13 Added description of the result codes passed to the callback function.<br>2007/05/09 Initial version.<BR> 98</p> 99 100<hr><p>CONFIDENTIAL</p></body> 101</html> 102