PBHGetVolParmsSync
#include <Files.h> File Manager (PBxxx)
Boolean async ; 0=await completion; 1=immediate return PBHGetVolParms obtains a variety of information about a specified volume including the volume name and the size and location of the buffer where the
volume parameters are stored.
pb is the address of a 44-byte ObjParam structure. The following fields are relevant:
Æ ioCompletion ProcPtr 4 12 Completion routine adddress (async =TRUE) ¨ ioResult OSErr 2 16 Error Code (0=no error, 1=not done yet) Æ ioVRefnum short 2 22 Volume reference
¨ ioBuffer Ptr 4 32 Volume parameters address Æ ioReqCount long 4 36 Buffer size
¨ ioActCount long 4 40 Volume parameters data length
async is a Boolean value. Use FALSE for normal (synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
nsvErr (-35) No such volume
paramErr (-50) No default volume
Notes: A volume's characteristics can change when the user enables and disables
to ensure that you have the current status of a volume.
The ioCompletion field holds an optional pointer to a completion routine,
which executes after PBHGetVolParms completes if you call the function asynchronously. Set this field to NIL when you call the function
synchronously.
Specify the volume to be described with a volume reference number, drive
number, or working directory reference number in the ioVRefNum field.
You must allocate memory to hold the returned attributes and put a pointer
to the buffer in the ioBuffer field. Specify the size of the buffer in the
ioReqCount field.
PBHGetVolParms places the attributes information in the buffer pointed to by the ioBuffer field and specifies the actual length of the data in the
ioActCount field.
short vMVersion ; ·Version number
long vMAttrib ; ·Bit vector of attributes (see vMAttrib
constants)
long vMServerAdr ; AppleTalk server address or zero
long vMVolumeGrade ; Approx. speed rating or zero if unrated
short vMForeignPrivID; Foreign Privilege model supported or zero
if none
The vMVersion field specifies the version of the attributes buffer
The vMAttrib field contains 32 bits that describe the volume. When set, the
bits in vMAttrib have these meanings:
Bit Name Meaning
31 bLimitFCBs Limit the number of file control blocks used
during copying to 8 instead of 16.
30 bLocalWList Use the returned shared volume handle for
theFinder's local window list.
29 bNoMiniFndr Disable Mini Finder menu item.
28 bNoVNEdit Lock volume name against editing.
27 bNoLclSync Do not let Finder change the modification date.
26 bTrshOffLine Zoom volume when it is unmounted.
25 bNoSwitchTo Do not switch launch to any application on the
volume.
24-21 Reserved.
20 bNoDeskItems Do not place objects on the Finder desktop.
19 bNoBootBlks Not a startup volume. Startup menu item
disabled. Boot blocks not copied.
18 bAccessCntl Volume supports AppleTalk AFP
access-control interfaces. The
PBHGetLogInInfo, PBHGetDirAccess ,
PBHSetDirAccess , PBHMapID and
PBHMapName functions are supported.
Special folder icons are used. The Access
Privileges menu command is enabled for disk
and folder items. The privileges field of
17 bNoSysDir Volume doesn't support a system directory.Do
not switch launch to this volume.
16 bHasExtFSVol Volume is an external file system volume.
Disk initialization package is not called. Erase
Disk menu command is disabled.
15 bHasOpenDeny Volume supports _OpenDeny and
PBHOpenRFDeny For copy operations,
source files are opened with reading enabled
and writing denied; destination files are opened
with writing enabled and reading and writing
disabled.
14 bHasCopyFile Volume supports _CopyFile. _CopyFile is used
in copy and duplicate operations if both source
and destination volumes have the same server
address.
13 bHasMoveRename Volume supports _MoveRename.
12 bHasDesktopMgr Volume supports all of the new desktop
11 bHasShortName Volume supports a name that fits the shorter
length requirements of another file system.
10 bHasFolderLock Folder is locked.
9 bHasPersonalAccessPrivileges Local file sharing is enabled.
8 bHasUserGroupList Volume supports the Users and Groups file and
thus the AFP privilege functions.
6 bHasFileIDs Volume supports file ID functions, includin
5 bHasBtreeMgr Reserved for internal use.
4 bHasBlankAccessPrivileges Volume supports inherited access privileges
for folders.
3-0 Reserved.
The vMLocalHand field is reserved.
The vMServerAdr field specifies the internet address of the server that
manages an AppleTalk server volume. This value is 0 if the volume does not
have a server.
The vMVolumeGrade field specifies the relative speed rating of the volume.
This scale is currently uncalibrated. Generally, lower values represent faster
speeds, but a value of 0 means that the volume is unrated.
The vMForeignPrivID field specifies an operating system with which the
volume can communicate access-control information. For more information
about access-control privileges, see Manipulating Privilege
Information in Foreign File Systems and Accessing Privilege
Information in Foreign File Systems under the section en titled
privilege information with any other file system; a value of fsUnixPriv means
it can share privilege information with the A/UX file system.