PBGetVolMountInfo
After ascertaining the size of the record needed and allocating storage, you can use thePBGetVolMountInfofunction to retrieve a record containing all the information needed to mount the volume, except for passwords. You can later pass this record to thePBVolumeMountfunction to mount the volume.
FUNCTION PBGetVolMountInfo (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 specification. --> ioBufferLongIntA pointer to mounting information. DESCRIPTION
ThePBGetVolMountInfofunction places the mounting information for a specified volume into the buffer pointed to by theioBufferfield. The mounting information for an AppleShare volume is stored as an AFP mounting record. The length of the buffer is specified by the value pointed to by theioBufferfield in a previous call toPBGetVolMountInfoSize.The
PBGetVolMountInfofunction does not return the user password or volume password in theAFPVolMountInforecord. Your application should solicit
these passwords from the user and fill in the record before attempting to mount the remote volume.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBGetVolMountInfoare
Trap macro Selector _HFSDispatch $0040 RESULT CODES
noErr 0 No error nsvErr -35 Volume not found paramErr -50 Parameter error extFSErr -58 External file system error; typically, function is not available for that volume