Carbon


RecoverHandle

Header: MacMemory.h Carbon status: Supported

Returns a handle to a relocatable block pointed to by a specified pointer.

Handle RecoverHandle (
    Ptr p
);
p

The master pointer to a relocatable block.

function result

A handle to a relocatable block point to by p. If p does not point to a valid block, the results of RecoverHandle are undefined.

DISCUSSION

The Memory Manager does not allow you to change relocatable blocks into nonrelocatable blocks, or vice-versa. However, if you no longer have access to a handle but still have access to its master pointer p, you can use the RecoverHandle function to recreate a handle to the relocatable block referenced by p.

Call the function MemError to get the result code. See “Result Codes”.

Even though RecoverHandle does not move or purge memory, you should not call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)