Important: The information in this document is obsolete and should not be used for new development.
PBUnlockRange
You can use thePBUnlockRangefunction 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.
--> ioCompletionProcPtrA pointer to a completion routine. <-- ioResultOSErrThe result code of the function. --> ioRefNumIntegerA file reference number. --> ioReqCountLongIntThe number of bytes in the range. --> ioPosModeIntegerThe positioning mode. --> ioPosOffsetLongIntThe positioning offset. DESCRIPTION
ThePBUnlockRangefunction unlocks a portion of a file that you locked withPBLockRange. You specify the range by filling in theioReqCount,ioPosMode,
andioPosOffsetfields 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
ThePBUnlockRangefunction does nothing if the file specified in theioRefNumfield 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 forPBUnlockRangeare
Trap macro Selector _HFSDispatch $0011 RESULT CODES