Important: The information in this document is obsolete and should not be used for new development.
PBVolumeMount
You can use thePBVolumeMount
function to mount a volume, using either the information returned by thePBGetVolMountInfo
function or a structure filled in by your application.
FUNCTION PBVolumeMount (paramBlock: ParmBlkPtr): OSErr;
- paramBlock
- A pointer to a basic File Manager parameter block.
--> ioCompletion
LongInt
A pointer to a completion routine. <-- ioResult
OSErr
The function's result code. <-- ioVRefNum
Integer
A volume reference number. --> ioBuffer
LongInt
A pointer to mounting information. DESCRIPTION
ThePBVolumeMount
function mounts a volume and returns its volume reference number. If you're mounting an AppleShare volume, place the volume's AFP mounting information record in the buffer pointed to by theioBuffer
field.The
PBGetVolMountInfo
function does not return the user and volume passwords; they're returned blank. Typically, your application asks the user for any necessary passwords and fills in those fields just before callingPBVolumeMount
. If you want to mount a volume with guest status, pass an empty string as the user password.If you have enough information about the volume, you can fill in the mounting record yourself and call
PBVolumeMount
, even if you did not save the mounting information while the volume was mounted. To mount an AFP volume, you must fill in the record with at least the zone name, server name, user name, user password, and volume password. You can lay out the fields in any order within the data field, as long as you specify the correct offsets.SPECIAL CONSIDERATIONS
The File Sharing workstation software introduced in system software version 7.0 does not currently pass the volume password. The AppleShare 3.0 workstation software does, however, pass the volume password.AFP volumes currently ignore the user authentication method passed in the
uamType
field of the volume mounting information record whose address is passed inioBuffer
. The most secure available method is used by default, except when a user mounts the volume as <Guest> and uses thekNoUserAuthentication
authentication method.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBVolumeMount
are
Trap macro Selector _HFSDispatch $0041 RESULT CODES