Important: The information in this document is obsolete and should not be used for new development.
PBGetUGEntry
You can use thePBGetUGEntry
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.
--> ioCompletion
ProcPtr
A pointer to a completion routine. <-- ioResult
OSErr
The result code of the function. --> ioObjType
Integer A function code. --> ioObjNamePtr
Ptr
A pointer to the returned user/group name. <-> ioObjID
LongInt
A user/group ID. DESCRIPTION
ThePBGetUGEntry
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 theioObjID
field. You can enumerate the users or groups in alphabetical order by settingioObjID
to 0 and then repetitively callingPBGetUGEntry
with the same parameter block until the result codefnfErr
is returned.You specify whether you want information about users or groups by setting the
ioObjType
field to the desired value. SetioObjType
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 setioObjNamePtr
toNIL
, 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 ofioObjID
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 forPBGetUGEntry
are
Trap macro Selector _HFSDispatch $0044 RESULT CODES
noErr 0 No error fnfErr -43 No more users or groups paramErr -50 Function not supported; or, ioObjID
is negative