Movatterモバイル変換


[0]ホーム

URL:


Legacy Documentclose button

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

PreviousBook ContentsBook IndexNext


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.
-->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
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 macroSelector
_HFSDispatch$0011

RESULT CODES
noErr0No error
ioErr-36I/O error
fnOpnErr-38File not open
eofErr-39Logical end-of-file reached
paramErr-50NegativeioReqCount
rfNumErr-51Bad reference number
extFSErr-58External file system
volGoneErr-124Server volume has been disconnected
afpRangeNotLocked-5020Specified range was not locked

PreviousBook ContentsBook IndexNext

Shop theApple Online Store (1-800-MY-APPLE), visit anApple Retail Store, or find areseller.

Copyright © 2016 Apple Inc. All rights reserved.


[8]ページ先頭

©2009-2025 Movatter.jp