PBHMapIDSync
PBHMapID Get user or group name from ID data
#include <Files.h> File Manager (PBxxx)
OSErr PBHMapID(pb, async ); Boolean async ; 0=await completion; 1=immediate return PBHMapID obtains a user's or group's name by referencing their unique ID.
pb is the address of a 44-byte ObjParam structure. The following fields are relevant:
Out-In Name Type Size Offset Description
-> ioCompletion ProcPtr 4 12 Completion routine address (if async =TRUE) <- ioResult OSErr 2 16 Error Code (0=no error, 1=not done yet) -> ioNamePtr long 4 18 Identification of pathname
-> ioVRefNum short 2 22 Volume reference
-> ioObjType short 2 26 Code for mapping function
<- ioObjNamePtr ProcPtr 4 28 Returned name's address -> ioObjID long 4 32 User or group ID being mapped
async is a Boolean value. Use FALSE for normal (synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
nsvErr (-35) No such volume
fnfErr (-43) Can't recognize owner or group ID
paramErr (-50) No default volume
Notes: This routine obtains a user's or group's name by mapping their unique ID,
contained in the ioObjID field. When the user is "Any User", the ID will be
zero and the name will be NIL. The ioObjType function code will be a 1 if
you're mapping an owner and a 2 if you're mapping a group. The
ioObjNamePtr field is a Pascal string containing the user name or the group
name. The user or group name can be up to 31 characters long. This routine
is the functional complement of PBHMapName.