Important: The information in this document is obsolete and should not be used for new development.
PtrAndHand
Use thePtrAndHandfunction 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
pntronto the end of this block.size- The number of bytes of the block referenced by
pntrto be copied.DESCRIPTION
ThePtrAndHandfunction takes the number of bytes specified by thesizeparameter, beginning at the location specified bypntr, and concatenates them onto the end of the relocatable block to whichhndlis a handle.The contents of the source block remain unchanged.
SPECIAL CONSIDERATIONS
BecausePtrAndHandallocates memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forPtrAndHandare
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 NILmaster pointermemWZErr -111 Attempt to operate on a free block