|
![]() |
![]() |
version 2003
PA_MoveBlock (source; dest; len)
Parameter | Type | Description | |
source | void * | → | Pointer to a block of memory to copy |
dest | void * | → | Address at which to copy it |
len | long | → | Number of bytes to copy |
Description
The routine
PA_MoveBlock
copies the block of memory pointed to by source to the one pointed to by dest.
This routine is an utility routine, it does not call any entry point of 4th Dimension. As is typical for a copy routine, be sure to check that dest has enough room to receive
theSize
bytes in order to avoid overlapping.
Warning
Source is first parameter as in BlockMove of Macintosh Toolbox; users of the memcpy ANSI function needs to take this into account..
Examples
All of the following examples assume that the destination string has enough room to receive the source string.
Copy a Pascal string in a C string:
PA_MoveBlock(&srcePString[1], destCString, srcePString[0]);
destCString[ srcePString[0] + 1 ] = 0; // add the null char
See Also
No reference.
Error Handling
keeps the last error that occurred
before
calling
PA_MoveBlock
.