beautypg.com

Apple AppleShare 3.0 File Server Controls User Manual

Page 9

background image

MaxVolumes := scPB.setupPB.scMaxVolumes;

MaxExpFolders := scPB.setupPB.scMaxExpFolders;

CurMaxSessions := scPB.setupPB.scCurMaxSessions;

END;

END;

END;

The following segment of code gets the server version information and stores

it in global variables for later use. (Global variables and their data types

are listed in "Using Server Control Calls," earlier in this chapter.)

err := MySCGetSetupInfo(@gSetupInfoRec, gMaxVolumes,

gMaxExpFolders, gCurMaxSessions);

SCSetSetupInfo

The following function calls SCSetSetupInfo to set the file server's setup

information.

FUNCTION MySCSetSetupInfo (SetupPtr: SetupInfoRecPtr):

OSErr;

VAR

scPB: SCParamBlockRec;

BEGIN

scPB.setupPB.scCode := SCSetSetupInfo;

scPB.setupPB.scSetupPtr := SetupPtr;

MySCSetSetupInfo := SyncServerDispatch(@scPB);

END;

Checking the server's status

This section describes the server control calls that you use to check the

server's status.

SCPollServer

The SCPollServer call returns information about the server's state, its

disconnect state, whether or not there has been an error, and how many

seconds are left before the server shuts down or before it disconnects a

user. The following function calls SCPollServer to get this information.

FUNCTION MySCPollServer (VAR ServerState: Integer;

VAR DisconnectState: Integer;