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 thePtrToXHand
function.
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
size
bytes, beginning atsrcPtr
.size
- The number of bytes to copy.
DESCRIPTION
ThePtrToXHand
function makes the existing handle, specified bydstHndl
, a handle to a copy of the number of bytes specified by thesize
parameter, beginning at the location specified bysrcPtr
.SPECIAL CONSIDERATIONS
BecausePtrToXHand
affects memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forPtrToXHand
are
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 NIL
master pointermemWZErr -111 Attempt to operate on a free block