beautypg.com

Apple AppleShare 3.0 Users and Groups Programming Interface User Manual

Page 15

background image

ugBadParamErr 13 async is TRUE, the length of the password

is greater than 8, or the length of the

user name is greater than 31.

ugInvalidPasswd 22 ugPassword is not the correct password.

ugFatalError 99 There is a problem with the users and

groups file. Delete it and re-create it.

UGNewGroup

FUNCTION UGNewGroup (thePB: UserGroupPBPtr; async: BOOLEAN): OSErr;

pascal OSErr UGNewGroup (UserGroupPBPtr thePB, Boolean async);

Parameter Block 18 ugNamePtr long pointer to group

name

24 ugRefNum word file reference

number

30 ugAccessID long program access ID

38 ugGroupID long group ID

UGNewGroup creates a new group. The name of the group is specified in

ugNamePtr (a pointer to a Str31) and the group ID is returned in ugGroupID.

Result Codes

noErr 0 No error.

ugUserAlreadyExists 1 User with that name already exists.

ugGroupAlreadyExists 2 Group with that name already exists.

ugNoMoreUGs 4 The maximum value ($FFFFFFFF) has been

reached.

ugBadParamErr 13 async is TRUE, ugNamePtr contains a

colon, or ugNamePtr points to a string

longer than 31 characters or shorter

than 1 character.

ugServerRunning 16 Server is running.

ugAdminRunning 17 Admin is running.

ugNotBtree 18 Users and groups file is not a B-Tree

file.

ugBadUID 21 The ID in ugAccessID is wrong. The users

and groups file may not be open.

ugFatalError 99 There is a problem with the users and

groups file. Delete it and re-create it.

UGDeleteGroup