Important: The information in this document is obsolete and should not be used for new development.
PBHSetFLock
You can use thePBHSetFLock
function to lock a file.
FUNCTION PBHSetFLock (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
ThePBHSetFLock
function locks the file with the name pointed to byioNamePtr
on the volume specified byioVRefNum
. After you lock a file, all new access paths to that file are read-only. Access paths currently in use aren't affected.If the
PBHGetVolParms
function indicates that the volume supports folder locking (that is, thebHasFolderLock
bit of thevMAttrib
field is set), you can usePBHSetFLock
to lock a directory.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBHSetFLock
is_HSetFLock
.RESULT CODES