Important: The information in this document is obsolete and should not be used for new development.
PBGetUGEntry
You can use thePBGetUGEntryfunction 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. --> ioObjTypeInteger A function code. --> ioObjNamePtrPtrA pointer to the returned user/group name. <-> ioObjIDLongIntA user/group ID. DESCRIPTION
ThePBGetUGEntryfunction 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 theioObjIDfield. You can enumerate the users or groups in alphabetical order by settingioObjIDto 0 and then repetitively callingPBGetUGEntrywith the same parameter block until the result codefnfErris returned.You specify whether you want information about users or groups by setting the
ioObjTypefield to the desired value. SetioObjTypeto 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 setioObjNamePtrtoNIL, no name is returned.If you set
ioObjIDto 0,PBGetUGEntryreturns information about the user or group known to the local server whose name is alphabetically first. If the value ofioObjIDis not 0,PBGetUGEntryreturns 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 forPBGetUGEntryare
Trap macro Selector _HFSDispatch $0044 RESULT CODES
noErr 0 No error fnfErr -43 No more users or groups paramErr -50 Function not supported; or, ioObjIDis negative