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>VFInactivateDrive(W)</title> 9</head> 10 11<body> 12 13<h1>VFInactivateDrive(W)</h1> 14 15<h2>C Specification</h2> 16<dl><dd><pre><code> 17#include <revolution/vf.h> 18 19typedef s32 VFErr; 20 21VFErr VFInactivateDrive( const char* drive ); 22VFErr VFInactivateDriveW( const VFWchar* drive ); 23 24VFErr VFInactivateDriveForce( const char* drive ); 25VFErr VFInactivateDriveForceW( const VFWchar* drive ); 26</code></pre></dd></dl> 27 28<h2>Arguments</h2> 29<p> 30<TABLE border="1" > 31 <tr> 32<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>drive</EM></STRONG></CODE></TD> 33<TD width="520">The name of the mounted drive. Specify a single letter.</TD> 34 </tr> 35</TABLE> 36</p> 37 38<h2>Return Values</h2> 39<PRE> 40Returns 0 when successful. 41Otherwise, returns <code><a href="./VFErr.html">VFErr</a></code> other than 0. 42</PRE> 43 44 45<H2>Description</H2> 46<p> 47Disables an already mounted drive. Call the separate function, <CODE>VFDetachDrive()</CODE>, as reservations will not be cleared otherwise. The name of the drive can be specified from A to Z.<br> As a result of this process, all of the data in the VF cache is written back to the media and the cache buffer is completely deallocated. <br>The data in VF cache is written back to the media and the cache buffer is released even if <CODE>VF_WRITE_BACK_CACHE</CODE> has been specified as the mode for <CODE>VFBuffering</CODE>.<BR><br><CODE>VFInactiveDrive(W)</CODE> cannot deactivate the drive if there are open files and/or directories on the specified drive (<CODE>VF_ERR_EACCES</CODE>) or a write-back to the device failed during deactivation (<CODE>VF_ERR_EIO</CODE>).<br>In contrast, <CODE>VFInactiveDriveForce(W)</CODE> can deactivate a drive in the states described above, because it destroys any opened file information and proceeds with the unmount process. In this case, the data of the open file may not be reflected correctly on the media.<br> 48 49</p> 50 51<h2>See Also</h2> 52<p> 53<code><a href="./VFActivateDrive.html">VFActivateDrive</a></code>, <code><a href="./VFUnmountDrive.html">VFUnmountDrive</a></code> 54</p> 55 56<H2>Revision History</H2> 57<p> 582006/11/09<br>2007/05/08 Revised the text about the cache. 59</p> 60 61 62<hr><p>CONFIDENTIAL</p></body> 63</html> 64