It's possible, but you'll need help from a DLL function call. If the DLL you are using doesn't have a copy memory function built in, one can be made in a separate DLL. I went ahead and knocked together a copy memory call in a dll. It's just bare bones - it does very little checking - it will only check if the pointers are NULL.
It's the USERS responsibility to know that the target and source memory the pointers point to is allocated to the correct size and you aren't trying to copy more bytes than are available or receivable. The dll is attached.
The call is as follows
resultptr = call dll(number,"copyMemory",targetptr,sourceptr,number of bytes)
If successful, then resultptr should be equal to targetptr otherwise -1 is returned.
For your code it might look like:
Enjoy your day.