Important: The information in this document is obsolete and should not be used for new development.
PtrAndHand
Use thePtrAndHand
function to concatenate part or all of a memory block to the end of a relocatable block.
FUNCTION PtrAndHand (pntr: Ptr; hndl: Handle; size: LongInt): OSErr;
pntr
- A pointer to the beginning of the data that the Memory Manager is to concatenate onto the end of the relocatable block.
hndl
- A handle to the relocatable block, whose size the Memory Manager expands so that it can concatenate the information from
pntr
onto the end of this block.size
- The number of bytes of the block referenced by
pntr
to be copied.DESCRIPTION
ThePtrAndHand
function takes the number of bytes specified by thesize
parameter, beginning at the location specified bypntr
, and concatenates them onto the end of the relocatable block to whichhndl
is a handle.The contents of the source block remain unchanged.
SPECIAL CONSIDERATIONS
BecausePtrAndHand
allocates memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forPtrAndHand
are
Registers on entry A0 Pointer to data to copy A1 Handle to relocatable block at whose end the copied data concatenated A2 Number of bytes to concatenate
Registers on exit A0 Handle to now-concatenated relocatable block D0 Result code RESULT CODES
noErr 0 No error memFullErr -108 Not enough memory nilHandleErr -109 NIL
master pointermemWZErr -111 Attempt to operate on a free block