Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
Shared Environment Routines / Manipulating Share Points


PBShare

You can use the PBShare function to establish a local volume or directory as a
share point.

FUNCTION PBShare (paramBlock: HParmBlkPtr; async: Boolean): OSErr;
paramBlock
A pointer to a basic 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.
-->ioDirIDLongIntA directory ID.

DESCRIPTION
The PBShare function makes the directory specified by the ioNamePtr and ioDirID fields a share point. If ioNamePtr is NIL, then ioDirID is the directory ID of the directory that is to become a share point. If ioNamePtr points to a partial pathname, ioDirID is the parent directory of the directory to be shared. The ioVRefNum field can contain a volume reference number, a working directory reference number, a drive number, or 0 for the default volume.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for PBShare are
Trap macroSelector
_HFSDispatch$0042

RESULT CODES
noErr0No error
tmfoErr-42Too many share points
fnfErr-43File not found
dupFNErr-48Already a share point with this name
paramErr-50Function not supported by volume
dirNFErr-120Directory not found
afpAccessDenied-5000This directory cannot be shared
afpObjectTypeErr-5025Object was a file, not a directory
afpContainsSharedErr-5033The directory contains a share point
afpInsideSharedErr-5043The directory is inside a shared directory

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996