Apple AppleShare 3.0 Users and Groups Programming Interface User Manual
Page 7

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. The administrator password is passed in ugAdminKey
(a pointer to a Str8); the function verifies that the password is correct
before returning the values of the ugRefNum and ugAccessID fields. The
ugRefNum field identifies the file being used, and the ugAccessID field
identifies the program using the file. These two fields are used by all other
UGLibrary functions except UGCloseFile and UGCreateFile. The value of the
ugAdminKey field should be a pointer to a zero-length Str8 if the file is
used by Macintosh File Sharing.
Result Codes
noErr 0 No error.
ugULInfoRecNotCreated 3 There is a problem with the users and
groups file. Delete it and re-create it.
ugBadParamErr 13 async is TRUE, the length of the
filename is greater than 31, or the
length of the administrator password
is greater than 8.
ugNotBtree 18 Users and groups file is not a B-Tree
file.
ugInvalidPasswd 22 ugAdminKey is not the correct password.
ugDefNameErr 98 Default name of users and groups file
could not be found.
ugFatalError 99 There is a problem with the users and it.
UGCloseFile
FUNCTION UGCloseFile (thePB: UserGroupPBPtr; async: BOOLEAN): OSErr;
pascal OSErr UGCloseFile (UserGroupPBPtr thePB, Boolean async);
Parameter Block 24 ugRefNum word file reference number
UGCloseFile closes the open users and groups file identified by ugRefNum.
Result Codes
noErr 0 No error.
ugBadParamErr 13 async is TRUE.
ugNotBtree 18 Users and groups file is not a B-Tree
file.
ugFatalError 99 There is a problem with the users and
groups file. Delete it and re-create it.