Important: The information in this document is obsolete and should not be used for new development.
PBUnlockRange
You can use thePBUnlockRange
function to unlock a portion of a file that was previously locked by a call toPBLockRange
.
FUNCTION PBUnlockRange (paramBlock: ParmBlkPtr; async: Boolean): OSErr;
paramBlock
- A pointer to a basic File Manager 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. --> ioRefNum
Integer
A file reference number. --> ioReqCount
LongInt
The number of bytes in the range. --> ioPosMode
Integer
The positioning mode. --> ioPosOffset
LongInt
The positioning offset. DESCRIPTION
ThePBUnlockRange
function unlocks a portion of a file that you locked withPBLockRange
. You specify the range by filling in theioReqCount
,ioPosMode
,
andioPosOffset
fields as described in the preceding discussion ofPBLockRange
. The range of bytes to be unlocked must be the exact same range locked by a previous
call toPBLockRange
.If for some reason you need to unlock a range whose beginning or length is unknown, you can simply close the file. When a file is closed, all locked ranges held by the user
are unlocked.SPECIAL CONSIDERATIONS
ThePBUnlockRange
function does nothing if the file specified in theioRefNum
field is open with shared read/write permission but is not located on a remote server volume or is not located under a share point on a local volume.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forPBUnlockRange
are
Trap macro Selector _HFSDispatch $0011 RESULT CODES