You're copying into the wrong address.
pMyStringAdress is a pointer that holds the heap address returned by VirtualAlloc.
But you used &pMyStringAdress (the address of the pointer variable on the stack) both when printing and in memcpy. That writes past the pointer variable itself and trashes the stack -> "Run-Time Check Failure #2 … stack … was corrupted."
- Fixes
Use pMyStringAdress (no &) when printing and copying.
Free with VirtualFree when done.
Minor: use the right printf specifiers.