PBUnshare
You can use the PBUnshare function to reverse the effects of PBShare.
FUNCTION PBUnShare (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.
| --> | 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. |
| --> | ioDirID | LongInt | A directory ID. |
DESCRIPTION
The PBUnshare function makes the share point specified by the ioNamePtr and ioDirID fields unavailable on the network. If ioNamePtr is NIL, then ioDirID is
the directory ID of the directory that is to become unavailable. If ioNamePtr points
to a partial pathname, ioDirID is the parent directory of the directory to become unavailable. 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 PBUnshare are
| Trap macro | Selector |
| _HFSDispatch | $0043 |
RESULT CODES
| noErr | 0 | No error |
| fnfErr | -43 | File not found |
| paramErr | -50 | Function not supported by volume |
| dirNFErr | -120 | Directory not found |
| afpObjectTypeErr | -5025 | Object was a file, not a directory; or, this directory is not a share point |