Mounting Mac OS X Server Volumes?
Mounting Mac OS X Server Volumes?
- Subject: Mounting Mac OS X Server Volumes?
- From: Horst Hoesel <email@hidden>
- Date: Mon, 18 Nov 2002 21:31:40 +0100
Hi gang,
I'm developing a small internal utility, which besides other things, needs
to mount an AppleShare Volume from a Mac OS X 10.2.2 Server. It is intended
to be used under Mac OS 9.2 (carbonized out of habit, but Mac OS X native is
not required). The code snippet below does work for a W2K server and good
old ASIP 6.3, but wont work for Mac OS X Server 10.2. (Btw. the code is a
ugly hack-up to reduce its size and allow for easy changes. Also I tried
almost all variations, with and without port, different UAMtypes, different
flags... And the most recent MoreFilesExtras i.e. 1.5.4)
To be precise it works once there is any volume of that server mounted, but
it returns error -1070 aspParamErr when there is no open connection with
that server. It behaves similar to how Aliases work (or rather don9t work)
with that server, they fail if no server connection exists, but work ok if
any volume is mounted. Did anyone find information on how things changed
with Mac OSXS? What's needed in addition to what I wrote?
I've already searched the archives of this list, Apple's developer web site
and the Developer CD/DVDs (TN1111), but came up empty.
// Uses MoreFilesExtras
OSErr myErr;
short MntvRefNum;
AFPXVolMountInfoPtr myAFPXMntPTR;
Str32 Serverzone = "\p"; // no zone so we do not revert to AppleTalk
Str32 Servername = "\pmyserver";
Str27 Servervolume = "\pmyvolume";
Str31 Username = "\pmyuser";
Str8 UserPassword = "\pmypass";
Str8 VolPassword = "\p";
Str32 UamName = "\p";
Str255 AlternateMount = "\p\1\0x08\0x02\0xc0\0xa8\0x2a\0x0b\0x02\0x24";
AlternateMount[0] = 0;
myErr = BuildAFPXVolMountInfo(
1 << volMountExtendedFlagsBit | kAFPExtendedFlagsAlternateAddressMask,
7, // NBP Lookup retry interval
5, // NBP Lookup retry count
kPassword,
Serverzone,
Servername,
Servervolume,
Username,
UserPassword,
VolPassword,
UamName,
10, // AFP Alternate Addresslength
AlternateMount, // AFP Alternate Address
&myAFPXMntPTR
);
myErr = VolumeMount(myAFPXMntPTR, &MntvRefNum);
Any hints greatly appreciated.
+-------------------------------------------------------+
I Horst Hoesel Phone: +49 89 660299-61 I
I VierZwo Software GmbH Fax: +49 89 660299-69 I
I Einsteinstr. 10a Email: email@hidden I
I 85521 Ottobrunn Web:
http://www.vierzwo.de I
I Germany I
+-------------------------------------------------------+
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.