beautypg.com

Apple AppleShare 3.0 Users and Groups Programming Interface User Manual

Page 8

background image

UGCreateFile

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

pascal OSErr UGCreateFile (UserGroupPBPtr thePB, Boolean async);

Parameter Block 18 ugNamePtr long pointer to filename

22 ugVRefNum word volume specification

26 ugDirID long parent directory ID

UGCreateFile creates an empty users and groups file with the name specified

by ugNamePtr (a pointer to a Str31) within the folder specified in ugDirID on

the volume specified in ugVRefNum. If ugNamePtr points to a zero-length

Str31, the localized name of the current users and groups file is used. (For

example, the localized name of the current users and groups file under U.S.

system software version 7.0 is

"Users & Groups Data File.") Otherwise, the name of the file to which

ugNamePtr points is used.

Result Codes

noErr 0 No error.

ugBadParamErr 13 async is TRUE or the length of the

filename is greater than 31.

ugDskFull 20 No space on disk.

ugDefNameErr 98 Default name of users and groups file

could not be found.

ugFatalError 99 There is a problem with the users and

groups file. Delete it and re-create it.

UGNewUser

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

pascal OSErr UGNewUser (UserGroupPBPtr thePB, Boolean async);

Parameter Block 18 ugNamePtr long pointer to user name

24 ugRefNum word file reference

number

30 ugAccessID long program access ID

34 ugUserID long user ID

50 ugPassword long pointer to user

password

54 ugUserFlags word user flags