Important: The information in this document is obsolete and should not be used for new development.
HLockHi
You can use theHLockHiprocedure to move a relocatable block to the top of the heap and lock it.
PROCEDURE HLockHi (h: Handle);
h- A handle to a relocatable block.
DESCRIPTION
TheHLockHiprocedure attempts to move the relocatable block referenced by the handlehupward until it reaches a nonrelocatable block, a locked relocatable block, or the top of the heap. ThenHLockHilocks the block.The
HLockHiprocedure is simply a convenient replacement for the pair of proceduresMoveHHiandHLock.SPECIAL CONSIDERATIONS
Because theHLockHiprocedure moves memory, you should not call it at interrupt time.Don't call
HLockHion blocks in the system heap. Don't callHLockHifrom a desk accessory.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forHLockHiare
Registers on entry A0 Handle to move and lock
Registers on exit D0 Result code RESULT CODES
noErr 0 No error nilHandleErr -109 NILmaster pointermemWZErr -111 Attempt to operate on a free block memLockedErr -117 Block is locked