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>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> 36NAND_RESULT_OK<br> 37NAND_RESULT_ALLOC_FAILED<br> 38NAND_RESULT_BUSY<br> 39NAND_RESULT_CORRUPT<br> 40NAND_RESULT_INVALID<br> 41NAND_RESULT_UNKNOWN<br> 42NAND_RESULT_FATAL_ERROR<br> 43</code> 44</p> 45</p> 46 47<h2>Description</h2> 48<p> 49This 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>. 50</p> 51<p> 52It is not necessary to apply <CODE>NANDSimpleSafeClose[Async]</CODE> to the <CODE>NANDFileInfo</CODE> structure passed to this function. 53</p> 54 55<p> 56This function may put the current thread to sleep. For precautions when calling similar functions, refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>. 57</p> 58 59<p> 60This 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. 61</p> 62 63<h2>See Also</h2> 64<p class="reference"> 65<a href="./NANDSimpleSafeCancelAsync.html">NANDSimpleSafeCancelAsync</a>, 66<a href="./NANDSimpleSafeOpen.html">NANDSimpleSafeOpen</a>, 67<a href="./NANDSimpleSafeOpenAsync.html">NANDSimpleSafeOpenAsync</a>, 68<a href="./NANDSimpleSafeClose.html">NANDSimpleSafeClose</a>, 69<a href="./NANDSimpleSafeCloseAsync.html">NANDSimpleSafeCloseAsync</a>, 70<a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a> 71</p> 72 73<h2>Revision History</h2> 74<p> 75 762008/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> 77</p> 78 79<hr><p>CONFIDENTIAL</p></body> 80</html>