Important: The information in this document is obsolete and should not be used for new development.
PBHMapName
You can use thePBHMapName
function to determine the user ID or group ID from a user or group name.
FUNCTION PBHMapName (paramBlock: HParmBlkPtr; async: Boolean): OSErr;
paramBlock
- A pointer to an
objParam variant of the 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. --> ioNamePtr
StringPtr
A pointer to a pathname. --> ioVRefNum
Integer
A volume specification. --> ioObjType
Integer
The login method. --> ioObjNamePtr
Ptr
A pointer to the user/group name. <-- ioObjID
LongInt
The user/group ID. Given a name, the
DESCRIPTION
PBHMapName
function returns the corresponding unique user ID
or group ID. The name is passed as a string inioObjNamePtr
. IfNIL
is passed, the ID returned is always 0. The maximum size of the name is 31 characters. TheioObjType
field is the mapping function code; its value is 3 if you're mapping a user name to a user ID or 4 if you're mapping a group name to a group ID. On exit,ioObjID
contains the mapped ID.Because user and group IDs are interchangeable under AFP 2.1 and later volumes, you might need to set the
ioObjType
field to determine which database (user or group) to search first. If both a user and a group have the same name, this field determines which kind of ID you receive.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBHMapName
are
Trap macro Selector _HFSDispatch $0035 RESULT CODES
noErr 0 No error fnfErr -43 Unrecognizable owner or group name paramErr -50 Function not supported by volume