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>VFAttachDrive*(W)</title> 9</head> 10 11<body> 12 13<h1>VFAttachDrive*(W)</h1> 14 15<h2>C Specification</h2> 16<dl><dd><pre><code> 17#include <revolution/vf.h> 18 19typedef s32 VFErr; 20 21VFErr VFAttachDriveNANDFlash( const char* drive ); 22VFErr VFAttachDriveNANDFlashW( const VFWchar* drive ); 23VFErr VFAttachDriveNANDFlashCache( const char* drive, void* cacheAddress, u32 cacheSize ); 24VFErr VFAttachDriveNANDFlashCacheW( const VFWchar* drive, void* cacheAddress, u32 cacheSize ); 25 26VFErr VFAttachDriveRam( const char* drive ); 27VFErr VFAttachDriveRamW( const VFWchar* drive ); 28VFErr VFAttachDriveRamCache( const char* drive, void* cacheAddress, u32 cacheSize ); 29VFErr VFAttachDriveRamCacheW( const VFWchar* drive, void* cacheAddress, u32 cacheSize ); 30 31VFErr VFAttachDriveDVD( const char* drive ); 32VFErr VFAttachDriveDVDW( const VFWchar* drive ); 33VFErr VFAttachDriveDVDCache( const char* drive, void* cacheAddress, u32 cacheSize ); 34VFErr VFAttachDriveDVDCacheW( const VFWchar* drive, 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 attached. Specify a single letter.</TD> 44 </tr> 45 <tr> 46<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>cacheAddress</EM></STRONG></CODE></TD> 47<TD width="520"> The cache address (specify NULL if not needed).</TD> 48 </tr> 49 <tr> 50<TD valign="top" width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>cacheSize</EM></STRONG></CODE></TD> 51<TD width="520"> The cache size (use a value equal to <CODE>VF_CACHE_SIZE_MIN</CODE> or greater, when used).</TD> 52 </tr> 53</TABLE> 54</p> 55 56<h2>Return Values</h2> 57<PRE> 58When successful, 0. 59When failed, a <code><a href="./VFErr.html">VFErr</a></code> other than 0. 60</PRE> 61 62 63<H2>Description</H2> 64<p> 65Reserves the specified drive. VF_ERR_ALREADY_ATTACHED_DRV_NAME is returned if the specified drive name is already reserved.<br>Calls should be differentiated by the type of media to be used. Drive letters from A to Z may be specified for the drive name.<br>Although the number of drives that can be mounted simultaneously will depend on the number of files that can be opened with the particular device, the maximum number of drives that can be mounted at once is 26.<br> Within the VF, a cache of <CODE>VF_CACHE_SIZE_MIN</CODE> (10KB) 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> 66</p> 67 68<h2>See Also</h2> 69<p> 70<code><a href="./VFActivateDrive.html">VFActivateDrive</a></code>, <code><a href="./VFInactivateDrive.html">VFInactivateDrive</a></code>, <code><a href="./VFDetachDrive.html">VFDetachDrive</a></code> 71</p> 72 73<H2>Revision History</H2> 74<p>2006/09/27 Initial version.</p> 75 76 77<hr><p>CONFIDENTIAL</p></body> 78</html> 79