beautypg.com

Apple AppleShare 3.0 File Server Controls User Manual

Page 22

background image

ArrayCount := 1; { one user }

NumMinutes := 10;

Flags := UNRFSendMsgMask; { send a message }

Message := 'Goodbye.';

err := MySCDisconnect(@UNRecID, ArrayCount, NumMinutes,

Flags, @Message);

IF err = noErr THEN

{ the disconnect was started }

ELSE

BEGIN

{ handle any errors }

END;

END;

SCDisconnectVolUsers

The following function calls SCDisconnectVolUers to disconnect the users of

specified volumes.

Note This call is not supported by Macintosh File Sharing.

FUNCTION MySCDisconnectVolUsers (DiscArrayPtr: LongIntPtr;

ArrayCount: Integer;

NumMinutes: Integer;

Flags: Integer;

MessagePtr: StringPtr):

OSErr;

VAR

scPB: SCParamBlockRec;

BEGIN

scPB.disconnectPB.scDiscArrayPtr := DiscArrayPtr;

scPB.disconnectPB.scArrayCount := ArrayCount;

scPB.disconnectPB.scCode := SCDisconnectVolUsers;

scPB.disconnectPB.scNumMinutes := NumMinutes;