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=utf-8"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>NANDSimpleSafeCancel</title> 9</head> 10 11<body> 12 13<h1>NANDSimpleSafeCancel</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction">#include <revolution/nand.h> 17 18s32 NANDSimpleSafeCancel( NANDFileInfo *info ); 19</pre></dd></dl> 20 21<h2>Arguments</h2> 22<p> 23<TABLE class="arguments" border="1" > 24 <tr> 25<TH>info</TH> 26<TD>Pointer to a <CODE>NANDFileInfo</CODE> structure.</TD> 27 </tr> 28</TABLE> 29</p> 30 31<h2>Return Values</h2> 32<p> 33Returns <code>NAND_RESULT_OK</code> if the resource is deallocated normally. 34<p> 35<code>NAND_RESULT_OK<br> NAND_RESULT_ALLOC_FAILED<br> NAND_RESULT_BUSY<br> NAND_RESULT_CORRUPT<br> NAND_RESULT_INVALID<br> NAND_RESULT_UNKNOWN<br> NAND_RESULT_FATAL_ERROR<br></code> 36</p> 37</p> 38 39<h2>Description</h2> 40<p> 41This function will try to release the resources (temporary files and file descriptors) that were used by the <CODE>NANDSimpleSafe</CODE>-type functions. Call this function when any <CODE>NANDSimpleSafe</CODE>-type function (except <CODE>NANDSimpleSafeCancel[Async]</CODE>) ends in 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>-type Functions</a>. When <CODE>NANDSimpleSafeCancel</CODE> returns an error, process the error in accordance with <a href="./sequence.html#sequence_1">Error Processing After Starting Application</a>. 42</p> 43<p> 44It is not necessary to apply <CODE>NANDSimpleSafeClose[Async]</CODE> to the <CODE>NANDFileInfo</CODE> structure passed to this function. 45</p> 46 47<p> 48This function sometimes puts the current thread to sleep, so it cannot be called from callback functions. For precautions when calling similar functions, refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>. 49</p> 50 51<p> 52This 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. 53</p> 54 55<h2>See Also</h2> 56<p class="reference"> 57<a href="./NANDSimpleSafeCancelAsync.html">NANDSimpleSafeCancelAsync</a><BR><a href="./NANDSimpleSafeOpen.html">NANDSimpleSafeOpen</a><BR><a href="./NANDSimpleSafeOpenAsync.html">NANDSimpleSafeOpenAsync</a><BR><a href="./NANDSimpleSafeClose.html">NANDSimpleSafeClose</a><BR><a href="./NANDSimpleSafeCloseAsync.html">NANDSimpleSafeCloseAsync</a><BR> <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a> 58</p> 59 60<h2>Revision History</h2> 61<p> 62 632008/08/01 Added an explanation related to FAT updates.<br>2008/05/26 In <B>Description</B>, revised the conditions for calling this function.<br>2007/09/25 Added information about the sleep status of threads.<br>2007/05/09 Initial version.<BR> 64</p> 65 66<hr><p>CONFIDENTIAL</p></body> 67</html>