vMVolumeGrade
GetVolParmsInfoBuffer structure
#include <Files.h>
typedef struct GetVolParmsInfoBuffer { Size Offset Description
short vMVersion; Â2 0 version number
long vMAttrib; Â4 2 bit vector of attributes;
see vMAttrib constants
Handle vMLocalHand; Â4 6 handle to private data
long vMServerAdr; Â4 10 network server address
long vMVolumeGrade; 4 14 relative speed rating
short vMForeignPrivID; 4 18 access privilege model

Notes: The first four fields are the same as those in the original
PBHGetVolParms attributes buffer, introduced with the network
software described in the File Manager Extensions . The last two fields
are new in system software version 7.0.
Offset Field Size Meaning
14 vMVolumeGrade long Relative speed rating of volume. This
scale is currently uncalibrated.
Generally, lower values re present
faster speeds. A value of 0 means the
volume is unrated.
18 vMForeignPrivID short Code for the privilege model
supported by the volume. This field
now has two possible values: 0
re presents a standard HFS volume,
which might or might not support the
AFP privilege model; fsUnixPriv
re presents an A/UX volume.
To determine whether the functions for manipulating privilege
information in foreign file systems are available on a volume, check the
vMForeignPrivID field in the attributes buffer. If this field contains a
nonzero value, the functions are available.
PBHGetVolParms returns the bulk of its volume description in the
vMAttrib field of the attributes buffer. Version 7.0 has defined additional
bits in the vMAttrib field to signal whether the following features are
present.
Feature Constant
Volume supports PBCatSearch bHasCatSearch
Volume supports the file ID functions, bHasFileIDs
including PBEx changeFiles
Volume supports inherited access bHasBlankAccessPrivileges
privileges for folders
Volume supports the Desk Manager bHasDesktopMgr
functions, described in the
Finder Interface
Volume supports a shorter name, for bHasShortName
compatibility with other file systems
Local file sharing is enabled bHasPersonalAccessPrivileges
Volume supports the Users and Groups bHasUserGroupList
file and thus the AFP privilege functions,
documented in the File Manager
The description of PBHGetVolParms lists all of the bits in the vMAttrib
field and their meanings.
The following code example illustrates how you can determine whether the
PBCatSearch function is available before using it to search a volume's
catalog.
// Testing for PBCatSearch
// Assumes inclusion of MacHeaders
// prototype your function like this prior to calling it
Boolean SupportsCatSearch( short);
Boolean SupportsCatSearch( short yourVRef)
{
HParamBlockRec myHPBRec;
HParmBlkPtr myHPBPtr;
GetVolParmsInfoBuffer VParmsBuf;
OSErr myErr;
// Error handler prototype
void DoError(OSErr);
myHPBPtr = &myHPBRec;
myHPBRec.ioParam.ioCompletion = nil; // no completion routine
myHPBRec.ioParam.ioNamePtr = nil;
myHPBRec.ioParam.ioVRefNum = yourVRef;
myHPBRec.ioParam.ioBuffer = (Ptr)&VParmsBuf;
myHPBRec.ioParam.ioReqCount = sizeof(GetVolParmsInfoBuffer);
myErr = PBHGetVolParms(myHPBPtr, FALSE);
if ( myErr )
// process the error
DoError(myErr);
if ( VParmsBuf.vMAttrib & bHasCatSearch << 1 )
else
}
To determine whether the remote mounting functions are available, you
must attempt to call one of them. If they are not available, the functions
return a result code of paramErr.