| 
    
        |  | 
This Technical Note documents the enhanced features of Macintosh File Sharing
version 7.6.1. [Feb 01 1995] |  
 
 
 
 
 Introduction
Macintosh File Sharing 7.6.1 supports a subset of the AppleShare File Server
4.0.2 server features. This Technical Note tells how to identify Macintosh File
Sharing 7.6.1, lists the server control calls supported by Macintosh File
Sharing 7.6.1, documents behavior differences in the supported server control
calls, documents the new rule File Sharing uses to determine what volumes to
share, and documents how to determine why a busy volume cannot be unmounted.
All other documentation for the AppleShare and File Sharing API can be found in
the AppleShare API SDK (AppleShare 3.0 Developer's Kit) on the Mac OS Software
Developer's Kit CD-ROM. Macintosh File Sharing 7.6.1 is installed as part of
System 7.5 Update. Back to top Identifying Enhanced Macintosh File Sharing
Macintosh File Sharing 7.6.1 has the server type of MFSType($0000) and has the
server version $003E. It can be identified using the server control call
SCServerVersion as shown here. 
	| enum
{
    kNewFileSharingVersion = 0x3e  /* File Sharing 7.6.1's version number */
};
Boolean  HasEnhancedFileSharing(void)
{
    SCParamBlockRec  scPB;
    Boolean          result;
    result = false;
    /* Make sure the ServerDispatch trap (A094) is available */
    if ( TrapAvailable(ServerDispatch) )
    {
        scPB.versionPB.scCode = SCServerVersion;
        scPB.versionPB.scExtNamePtr = NULL;
        if ( SyncServerDispatch(&scPB) == noErr )
        {
            /* See if server is file sharing with */
            /* a server version => kNewFileSharingVersion */
            result = ( (scPB.versionPB.scServerType == MFSType) &&
                       (scPB.versionPB.scServerVersion >= kNewFileSharingVersion) )
        }
    }
    return ( result );
 |  Back to top Server Control Calls SupportedMacintosh File Sharing 7.6.1 supports the following server control calls: 
	SCCancelShutDownSCDisconnectSCGetExpFldrSCGetSetupInfoSCPollServerSCServerVersionSCSetSetupInfoSCShutDownSCStartServerSCSendMessageSCGetServerStatusSCDisconnectVolUsersSCGetUserNameRecSCGetUserMountInfoSCSetCopyProtectSCClrCopyProtectSCWakeServerSCSleepServer 
Macintosh File Sharing 7.6.1 does not support the following server control
calls which are supported by AppleShare 3.0 and does not support any of the
internal server control calls used by AppleShare Pro or AppleShare 4.0: 
	SCInstallServerEventProcSCRemoveServerEventProcSCGetServerEventProc 
Of the server control calls that are supported, some behave differently with
Macintosh File Sharing 7.6.1 than they do on an AppleShare File Server. The
sections that follow explain those differences. SCDisconnect
The SCDisconnect call does not send disconnect attention messages under
Macintosh File Sharing. SCDisconnectwas supported by older versions of File
Sharing, but thescFlagsandscMessagePtrfields in the parameter block were
ignored. Some program failed to initialize those fields, so Macintosh File
Sharing 7.6.1 must ignore them to prevent address and bus errors. SCGetSetupInfo
The SCGetSetupInfocall now supports thescMaxVolumes,scMaxExpFolders, andscCurMaxSessionfields in the parameter block, and in the setup information
record (SetupInfoRec),SILoginMsgis supported. However, theSCGetSetupInfocall still does not use the following fields of the setup information record: 
	SIVolInfoLocationSIVolInfoVisibleSIUserInfoLocationSIUserInfoVisibleSIShutDownMinsSISpare SCSetSetupInfo
The SCSetSetupInfocall now supports theSILoginMsgin the setup information
record (SetupInfoRec). However, theSCSetSetupInfocall still does not use the
following fields of the setup information record: 
	SIVolInfoLocationSIVolInfoVisibleSIUserInfoLocationSIUserInfoVisibleSIShutDownMinsSISpare SCShutDown
The SCShutDowncall does not send shutdown attention messages under Macintosh
File Sharing.SCShutDownwas supported by older versions of File Sharing, but
thescFlagsandscMessagePtrfields in the parameter block were ignored. Some
program failed to initialize those fields, so Macintosh File Sharing 7.6.1 must
ignore them to prevent address and bus errors. Back to top What Volumes Are Shared?Audio CDs are Never Shared
Because a shared Audio CD has never made sense, Macintosh File Sharing 7.6.1
never shares Audio CDs. Audio CDs are identified by File Sharing by the file
system ID of the Audio CD Access file system, $4A48. bDontShareIt Volume Attribute Bit
Foreign file systems can now tell Macintosh File Sharing to never share their
volumes by setting the bDontShareItvolume attribute bit (bit 21 in thevMAttribfield ofGetVolParmsInfoBuffer) returned in response to aPBHGetVolParmsrequest (HFSDispatch, selector $30). Network foreign file
systems should always set thebDontShareItbit. Back to top New error code for PBUnmount
When you try to unmount a volume that has one or more files open,
PBUnmountwill fail because the volume is busy. In the past, the error
result returned byPBUnmountwhen this happened was alwaysfBsyErr(-47). To distinguish between the volume being busy because
files are open by the local user vs. remote users, Macintosh File Sharing 7.6.1
now returns two error codes:fBsyErrif all files are open only by a
local user;afpFileBusy(-5010) if any files are open by remote
users. Back to top ReferencesInside Macintosh: Files, Chapter 2, PBHGetVolParms Mac OS SDK CD-ROM, AppleShare API SDK (AppleShare 3.0 Developer's Kit),
Server Control Calls and Server Event Handling FL 35 - Determining Which File System Is Active Back to top 
 Downloadables
            
               | 
 | Acrobat version of this Note (56K) | Download |  
 Back to top |