Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
Shared Environment Routines / Manipulating Share Points


PBGetUGEntry

You can use the PBGetUGEntry function to get a list of user and group entries from the local file server.

FUNCTION PBGetUGEntry (paramBlock: HParmBlkPtr; async: Boolean):
                         OSErr;
paramBlock
A pointer to an objParam variant of an HFS parameter block.
async
A Boolean value that specifies asynchronous (TRUE) or synchronous (FALSE) execution.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe result code of the function.
-->ioObjTypeIntegerA function code.
-->ioObjNamePtrPtrA pointer to the returned user/group name.
<->ioObjIDLongIntA user/group ID.

DESCRIPTION
The PBGetUGEntry function returns the name and ID of the user or group whose name is alphabetically next to that of the user or group whose ID is contained in the ioObjID field. You can enumerate the users or groups in alphabetical order by setting ioObjID to 0 and then repetitively calling PBGetUGEntry with the same parameter block until the result code fnfErr is returned.

You specify whether you want information about users or groups by setting the ioObjType field to the desired value. Set ioObjType to 0 to receive the next user
entry; set it to -1 to receive the next group entry.

The user or group name is returned as a Pascal string pointed to by ioObjNamePtr.
The maximum size of the string is 31 characters, preceded by a length byte. If you set ioObjNamePtr to NIL, no name is returned.

If you set ioObjID to 0, PBGetUGEntry returns information about the user or group known to the local server whose name is alphabetically first. If the value of ioObjID is not 0, PBGetUGEntry returns information about the user or group whose name follows immediately in alphabetical order that of the user or group having that ID.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for PBGetUGEntry are
Trap macroSelector
_HFSDispatch$0044

RESULT CODES
noErr0No error
fnfErr-43No more users or groups
paramErr-50Function not supported; or, ioObjID is negative

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996