Forget the read only stuff... Nothing in memory is really read-only (just when the process constantly writes to the address which is not the case here). So you either just call str_cpy and if it fails you can use VirtualProtect to change the page protections because it might be protected (ReadOnly).