Carbon


PtrAndHand

Header: MacMemory.h Carbon status: Supported

Concatenates part or all of a memory block to the end of a relocatable block.

OSErr PtrAndHand (
    const void *ptr1, 
    Handle hand2, 
    SInt32 size
);
ptr1

A pointer to the beginning of the data that the Memory Manager is to concatenate onto the end of the relocatable block.

hand2

A handle to the relocatable block, whose size the Memory Manager expands so that it can concatenate the information from ptr1 onto the end of this block.

size

The number of bytes of the block referenced by ptr1 to copy.

function result

A result code. A result code.

DISCUSSION

The PtrAndHand function takes the number of bytes specified by the size parameter, beginning at the location specified by ptr1, and concatenates them onto the end of the relocatable block to which hand2 is a handle. The contents of the source block remain unchanged.

Because PtrAndHand allocates 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)