Apple AppleShare 3.0 File Server Controls User Manual
Page 12

scPB: SCParamBlockRec;
BEGIN
scPB.startPB.scCode := SCStartServer;
scPB.startPB.scStartSelect := kCurInstalled;
scPB.startPB.scEventSelect := kFinderExtn;
MySCStartServer := SyncServerDispatch(@scPB);
END;
SCShutDown
The following function calls SCShutDown to shut down the file server.
!! IMPORTANT The AppleShare File Server application automatically quits if
the AppleShare File Server 3.0 is shut down with the SCShutDown call. !!
FUNCTION MySCShutDown (NumMinutes: Integer; Flags: Integer;
MessagePtr: StringPtr): OSErr;
VAR
scPB: SCParamBlockRec;
BEGIN
scPB.disconnectPB.scCode := SCShutDown;
scPB.disconnectPB.scNumMinutes := NumMinutes;
scPB.disconnectPB.scFlags := Flags;
scPB.disconnectPB.scMessagePtr := MessagePtr;
MySCShutDown := SyncServerDispatch(@scPB);
END;
SCCancelShutDown
The following function calls SCCancelShutDown to cancel a shutdown or
disconnect call in progress.
FUNCTION MySCCancelShutDown: OSErr;
VAR
scPB: SCParamBlockRec;
BEGIN
scPB.disconnectPB.scCode := SCCancelShutDown;