PBHMapNameSync
PBHMapName Get user or group ID from a known name
#include <Files.h> File Manager (PBxxx)
OSErr PBHMapName(pb, async );
HParmBlkPtr pb ; address of a 44-byte ObjParam structure
Boolean async ; 0=await completion; 1=immediate return
returns Error Code; 0=no error
PBHMapName obtains a user's or group's unique ID by referencing their
names.
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 Volume name
-> ioVRefNum short 2 22 Volume reference
-> ioObjNamePtr ProcPtr 4 28 Owner or group name's address
-> ioObjType short 2 26 Code for mapping function
-> 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.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
nsvErr (-35) No such volume
fnfErr (-43) Can't recognize owner or group name
paramErr (-50) No default volume

Notes: This routine obtains a user's or group's unique ID by mapping their names,
as pointed to in the ioObjNamePtr field. If NIL is passed as the name, the
value will always be zero. The ioObjType function code will be a 3 if you're
mapping an owner and a 4 if you're mapping a group. The user or group
name can be up to 31 characters long. This routine is the functional
complement of PBHMapID.