[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mounting Server Volumes
- To: R15546@EMAIL.SPS.MOT.COM, INFO-MCL@digitool.com
- Subject: Re: Mounting Server Volumes
- From: CAMPER@AppleLink.Apple.COM (Camper, Dan)
- Date: 03 Mar 95 12:18 GMT
- Sender: owner-info-mcl@digitool.com
> Is there a way to connect to a server from within MCL, i.e., without going to
> the chooser?
Here's a function I use to mount AppleShare servers. Unlike the alias method
mentioned earlier, this one requires a direct LAN connection.
===================================================
(defun mount-server (zone server user password volume &optional (volpass ""))
(unless password
(setf password ""))
(unless user
(setf user ""))
(rlet ((afp :AFPVolMountInfo
:length 175
:media #$AppleShareMediaType
:flags 1
:nbpInterval 5
:nbpCount 10
:uamType #$kTwoWayEncryptPassword
:zoneNameOffset $zoneNameOffset
:serverNameOffset $serverNameOffset
:volNameOffset $volNameOffset
:userNameOffset $userNameOffset
:userPassWordOffset $userPassWordOffset
:volPassWordOffset $volPassWordOffset))
(%put-string afp zone $zoneNameOffset)
(%put-string afp server $serverNameOffset)
(%put-string afp volume $volNameOffset)
(%put-string afp user $userNameOffset)
(%put-string afp password $userPassWordOffset)
(%put-string afp volpass $volPassWordOffset)
(rlet ((pb :ParamBlockRec
:ioCompletion (%null-ptr)
:ioBuffer afp))
(#_PBVolumeMount pb))))
===================================================
Cheers,
Dan