beautypg.com

Apple AppleShare 3.0 File Server Controls User Manual

Page 11

background image

VAR VolListModDate: LongInt):

OSErr;

VAR

scPB: SCParamBlockRec;

BEGIN

scPB.statusPB.scCode := SCGetServerStatus;

scPB.statusPB.scNamePtr := NamePtr;

MySCGetServerStatus := SyncServerDispatch(@scPB);

ServerFlags := scPB.statusPB.scServerFlags;

NumSessions := scPB.statusPB.scNumSessions;

UserListModDate := scPB.statusPB.scUserListModDate;

Activity := scPB.statusPB.scActivity;

VolListModDate := scPB.statusPB.scVolListModDate;

END;

Starting and stopping the file service

This section describes the server control calls that you use to start and

stop file servers.

SCStartServer

The following function calls SCStartServer to start the Macintosh File

Sharing server.

!! IMPORTANT The AppleShare File Server 3.0 is normally started by the

AppleShare File Server application. When the AppleShare File Server

application is launched, it checks to see if the file server is running. If

it is, the AppleShare File Server application assumes its role as the file

server's user interface. If the file server is not running, the AppleShare

File Server application starts the server by calling SCStartServer before

assuming its role as user interface.

If a server addition starts the AppleShare File Server 3.0 by calling

SCStartServer, the file service starts up, but the AppleShare File Server

application (the user interface) does not. Unless your program provides the

functionality of the AppleShare File Server application, it should probably

not call SCStartServer to start the AppleShare File Server 3.0. Instead,

start the file server in the usual way -- by launching the AppleShare File

Server application. !!

FUNCTION MySCStartServer: OSErr;

VAR