Important: The information in this document is obsolete and should not be used for new development.
PBHMapID
You can use thePBHMapIDfunction 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.
--> ioCompletionProcPtrA pointer to a completion routine. <-- ioResultOSErrThe result code of the function. --> ioNamePtrStringPtrA pointer to a pathname. --> ioVRefNumIntegerA volume specification. --> ioObjTypeIntegerThe login method. <-- ioObjNamePtrPtrA pointer to the user/group name. --> ioObjIDLongIntThe user/group ID. DESCRIPTION
ThePBHMapIDfunction returns the name of a user or group given its unique ID. TheioObjIDfield contains the ID to be mapped. (AppleShare uses the value 0 to signify <Any User>.) TheioObjTypefield 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
ioObjTypefield.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBHMapIDare
Trap macro Selector _HFSDispatch $0034 RESULT CODES
noErr 0 No error fnfErr -43 Unrecognizable owner or group nam eparamErr -50 Function not supported by volume