Important: The information in this document is obsolete and should not be used for new development.
PtrToXHand
To copy data referenced by a pointer to an already existing relocatable block, use thePtrToXHandfunction.
FUNCTION PtrToXHand (srcPtr: Ptr; dstHndl: Handle; size: LongInt): OSErr;
srcPtr- The address of the first byte to copy.
dstHndl- A handle to an already existing relocatable block to which to copy
sizebytes, beginning atsrcPtr.size- The number of bytes to copy.
DESCRIPTION
ThePtrToXHandfunction makes the existing handle, specified bydstHndl, a handle to a copy of the number of bytes specified by thesizeparameter, beginning at the location specified bysrcPtr.SPECIAL CONSIDERATIONS
BecausePtrToXHandaffects memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forPtrToXHandare
Registers on entry A0 Pointer to source A1 Handle to destination D0 Number of bytes to copy
Registers on exit A0 Handle to destination 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