Important: The information in this document is obsolete and should not be used for new development.
PBVolumeMount
You can use thePBVolumeMountfunction to mount a volume, using either the information returned by thePBGetVolMountInfofunction or a structure filled in by your application.
FUNCTION PBVolumeMount (paramBlock: ParmBlkPtr): OSErr;
- paramBlock
- A pointer to a basic File Manager parameter block.
--> ioCompletionLongIntA pointer to a completion routine. <-- ioResultOSErrThe function's result code. <-- ioVRefNumIntegerA volume reference number. --> ioBufferLongIntA pointer to mounting information. DESCRIPTION
ThePBVolumeMountfunction 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 theioBufferfield.The
PBGetVolMountInfofunction 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
uamTypefield 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 thekNoUserAuthenticationauthentication method.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBVolumeMountare
Trap macro Selector _HFSDispatch $0041 RESULT CODES