beautypg.com

Apple AppleShare 3.0 File Server Controls User Manual

Page 60

background image

SCStartServer

SCStartServer starts the file 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 it provides the

functionality of the AppleShare File Server application, your program 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. !!

Parameter (uses startPB variant of SCParamBlockRec)

Block 16 ioResult word

26 scCode word

28 scStartSelect word

30 scEventSelect word

Fields ioResult Word result value: Result code.

scCode Word input value: The server control code, which

must always be SCStartServer ($0000).

scStartSelect Word input value: Determines the server to start,

as follows:

kCurInstalled Use this value to start up the currently installed

server, either an AppleShare File Server 3.0 or

Macintosh File Sharing.

scEventSelect Word input value: Always kFinderExtn

Result Codes noErr 0 No error.

paramErr -50 The server is already running.

Other errors from the launching of the server -- such as fnfErr and

memFullErr -- may also be returned.

SCWakeServer

SCWakeServer reactivates a server that has been "put to sleep" (temporarily

shut down with the SCSleepServer call). SCWakeServer will only start a server

that has been put to sleep; it will not start a server that has been shut

down by the SCShutdown call. No parameters are needed, since this call uses

the parameters passed in by the original StartServer trap.