beautypg.com

Apple AppleShare 3.0 File Server Controls User Manual

Page 18

background image

UNRecID := scPB.userInfoPB.scUNRecID;

UserID := scPB.userInfoPB.scUserID;

LoginTime := scPB.userInfoPB.scLoginTime;

LastUseTime := scPB.userInfoPB.scLastUseTime;

SocketNum := scPB.userInfoPB.scSocketNum;

END;

The following procedure creates a list of the users logged on to a file

server.

PROCEDURE GetAllUserNameRecs;

VAR

err: OSErr;

UserName: Str31;

Position: LongInt;

UNRecID: LongInt;

UserID: LongInt;

LoginTime: LongInt;

LastUseTime: LongInt;

SocketNum: AddrBlock;

BEGIN

Position := 0;

REPEAT

err := MySCGetUserNameRec(@UserName, Position, UNRecID,

UserID, LoginTime, LastUseTime, SocketNum);

IF err = noErr THEN

BEGIN

{ do something with the user information returned }

END

ELSE IF err <> fnfErr THEN

{ fnfErr only means there are no more users }

BEGIN