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>VFMountDrive(W)</title>
9</head>
10
11<body>
12
13<h1>VFMountDrive(W)</h1>
14
15<h2>C Specification</h2>
16<dl><dd><pre><code>
17#include &lt;revolution/vf.h&gt;
18
19typedef s32	VFErr;
20
21VFErr VFMountDriveNANDFlash( const char* drive, const char* sysFileName );
22VFErr VFMountDriveNANDFlashW( const VFWchar* drive, const char* sysFileName );
23VFErr VFMountDriveNANDFlashCache( const char* drive, const char* sysFileName, void* cacheAddress, u32 cacheSize );
24VFErr VFMountDriveNANDFlashCacheW( const VFWchar* drive, const char* sysFileName, void* cacheAddress, u32 cacheSize );
25
26VFErr VFMountDriveRam( const char* drive, void* memory );
27VFErr VFMountDriveRamW( const VFWchar* drive, void* memory );
28VFErr VFMountDriveRamCache( const char* drive, void* memory, void* cacheAddress, u32 cacheSize );
29VFErr VFMountDriveRamCacheW( const VFWchar* drive, void* memory, void* cacheAddress, u32 cacheSize );
30
31VFErr VFMountDriveDVD( const char* drive, const char* sysFileName );
32VFErr VFMountDriveDVDW( const VFWchar* drive, const char* sysFileName );
33VFErr VFMountDriveDVDCache( const char* drive, const char* sysFileName, void* cacheAddress, u32 cacheSize );
34VFErr VFMountDriveDVDCacheW( const VFWchar* drive, const char* sysFileName, void* cacheAddress, u32 cacheSize );
35
36</code></pre></dd></dl>
37
38<h2>Arguments</h2>
39<p>
40<TABLE border="1" >
41  <tr>
42<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>drive</EM></STRONG></CODE></TD>
43<TD width="520">The name of the drive to be mounted. Specify a single letter.</TD>
44  </tr>
45  <tr>
46<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>sysFileName</EM></STRONG></CODE></TD>
47<TD width="520">The name of the VFF file name to be mounted. The file name must use 8.3 format.</TD>
48  </tr>
49  <tr>
50<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>memory</EM></STRONG></CODE></TD>
51<TD width="520">Address of the RAM to be mounted.</TD>
52  </tr>
53  <tr>
54<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>cacheAddress</EM></STRONG></CODE></TD>
55<TD width="520"> Cache address (specify NULL if not needed).</TD>
56  </tr>
57  <tr>
58<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>cacheSize</EM></STRONG></CODE></TD>
59<TD width="520"> Cache size (use a value equal to <CODE>VF_CACHE_SIZE_MIN</CODE> or greater, when used).</TD>
60  </tr>
61
62</TABLE>
63</p>
64
65<h2>Return Values</h2>
66<pre>
67When successful, 0.
68When failed, a <code><a href="./VFErr.html">VFErr</a></code> other than 0.
69</pre>
70
71
72<h2>Description</h2>
73<p>
74Mounts the specified drive and enables it for use. <CODE>VF_ERR_ALREADY_MOUNTED_DRV_NAME</CODE> is returned if the specified drive name is already in use. Drive letters from A to Z may be specified for the drive name. Calls should be differentiated by the type of media to be used. As <CODE>VFAttachDriveXXX()</CODE> and <CODE>VFActivateDriveXXX()</CODE> are called internally, they are not needed when using <CODE>VFMountDrivexxx()</CODE>.<br> When a <CODE>.vff</CODE> file is used for the first time, be sure to format it with <CODE>VFFormatDrive()</CODE> after calling <CODE>VFMountDriveXXX()</CODE>. <br> Returns <CODE>VF_ERR_VFF_FILE_FORMAT</CODE> when the creation of a selected <CODE>.vff</CODE> file fails.<br> Delete and recreate the <CODE>.vff</CODE> file.<br><br> Within the VF, a cache of <CODE>VF_CACHE_SIZE_MIN (10 KB)</CODE> is set for each drive.<br> To increase speed, set <CODE>cacheAddress</CODE> and <CODE>cacheSize</CODE> to use a cache of a specified size.<br> This dramatically increases the speed for file creation in directories with many entries.<br> The set cache buffers are enabled until either <CODE>VFDetachDrive()</CODE> or <CODE>VFUnmountDrive()</CODE> is called.<br> Also be aware that cache buffers cannot be shared between drives.<br>
75</p>
76
77<h2>See Also</h2>
78<p>
79<code><a href="./VFUnmountDrive.html">VFUnmountDrive</a></code>, <code><a href="./VFAttachDrive.html">VFAttachDrive</a></code>, <code><a href="./VFActivateDrive.html">VFActivateDrive</a></code>, <code><a href="./VFFormatDrive.html">VFFormatDrive</a></code>
80</p>
81
82<H2>Revision History</H2>
83<p>2006/10/31 Release.</p>
84
85<hr><p>CONFIDENTIAL</p></body>
86</html>
87