RecoverHandleSys
Recove rHandle
Obtain handle from a pointer to a relocatable block Handle Recove rHandle(thePtr ); Ptr thePtr ; a pointer to a relocatable block returns a handle leading to the data of the block
Given a copy of a master pointer, Recove rHandle returns a handle leading to
the data at that block.
thePtr is the address of a relocatable block of memory.
was not pointing to a relocatable block. Calling MemError may provide additional information.
Notes: There is another routine, Recove rHandleSys, which performs the
equivalent operation to Recove rHandle, but in the System heap zone. It
takes the same parameters as Recove rHandle.
Recove rHandle can be used to find out which Handle owns a relocatable block. For instance, when a 'CODE' resource gets control, it may be passed
its address (a pointer). To lock/unlock itself, the code may use
Recove rHandle to obtain its Handle, then use HLock and HUnlock.