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>VFUnmountDrive(W)</title>
9</head>
10
11<body>
12
13<h1>VFUnmountDrive(W)</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/vf.h&gt;
18
19typedef s32	VFErr;
20
21VFErr VFUnmountDrive( const char* drive );
22VFErr VFUnmountDriveW( const VFWchar* drive );
23
24VFErr VFUnmountDriveForce( const char* drive );
25VFErr VFUnmountDriveForceW( 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 drive to be unmounted. 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 and unmounts the specified drive. The name of the drive can be specified from A to Z. Since this function calls the <CODE>VFDetachDrive</CODE> and <CODE>VFInactivateDrive</CODE> functions internally, they are not needed when <CODE>VFUnmountDrive</CODE> is used.<br><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 in the <CODE>VFBuffering</CODE> function.<BR><br> <CODE>VFUnmountDrive(W)</CODE> cannot release the specified drive from mounted status if there are open files and/or directories on the drive (<CODE>VF_ERR_EACCES</CODE>), or a write-back to the device failed during unmount (<CODE>VF_ERR_EIO</CODE>). In contrast, because <CODE>VFUnmountDriveForce(W)</CODE> destroys any opened file information and proceeds with the unmount process, it can release the mounted status of a drive in the states described above. In this case, the data of the open file may not be reflected correctly on the media.<br>
48</p>
49
50<h2>See Also</h2>
51<p>
52<code><a href="./VFMountDrive.html">VFMountDrive</a></code>, <code><a href="./VFDetachDrive.html">VFDetachDrive</a></code>, <code><a href="./VFInactivateDrive.html">VFInactivateDrive</a></code>
53</p>
54
55<H2>Revision History</H2>
56<p>
572006/11/09<br>2007/05/08 Revised the text about the cache.
58</p>
59
60
61<hr><p>CONFIDENTIAL</p></body>
62</html>
63