Important: The information in this document is obsolete and should not be used for new development.
PBHMapID
You can use thePBHMapID
function to determine the name of a user or group if you know the user or group ID.
FUNCTION PBHMapID (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. DESCRIPTION
ThePBHMapID
function returns the name of a user or group given its unique ID. TheioObjID
field contains the ID to be mapped. (AppleShare uses the value 0 to signify <Any User>.) TheioObjType
field is the mapping function code; its value is 1 if you're mapping a user ID to a user name or 2 if you're mapping a group ID to a group name. The name is returned inioObjNamePtr
; the maximum size of the name is 31 characters (preceded by a length byte).Because user and group IDs are interchangeable under AFP 2.1 and later volumes, you might not need to specify a value in the
ioObjType
field.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBHMapID
are
Trap macro Selector _HFSDispatch $0034 RESULT CODES
noErr 0 No error fnfErr -43 Unrecognizable owner or group nam e
paramErr -50 Function not supported by volume