Question: This is from the perspective of someone on a Linux x86 system. Is it possible to store something other than a hardcoded address in a pointer? Here's the catch though: the value going to be stored in the pointer will have previously been stored as a string. Pretty sure there isn't a way for me to reference any register or other pointer but I just wanted to be sure. And I know people are going to ask why I want to do something like this; it would take too long to explain and I'm absolutely sure there is no alternative solution.

Sould have added this:

```
    char* addresses = "\x32\x45\x19..."

```

I want to store something other than a hardcoded address in the "addresses".

EDIT:

lol wow I thought I was fairly clear. I have a array of characters, a pointer, or as I call it: a string. This string is going to be treated as a ZVAL struct in PHP. I am wondering if I can store information other than hardcoded addresses within the string.

Answer: 
Yes this is correct behaviour and it is happening because you have insufficient privileges to write directly to the HKLM hive. It's called virtualisation and happens for the file system as well, it has been a behaviour in the OS since Vista.

You should continue as you are and attempt to also read from the same HKLM key you are writing to, Windows will transparently redirect for you.

Preet has [kindly provided](https://stackoverflow.com/a/10941366/109702) a MSDN link which you should read thoroughly.

Note that when you access a key under HKLM you should also include the permissions you want, even if you are running as administrator (because the key is not automatically opened with admin rights, you have to request it):

```
key = key.OpenSubKey(keyname, RegistryKeyPermissionCheck.ReadWriteSubTree, RegistryRights.FullControl);

```
1. [This is Registry Virtualization (msdn)](http://msdn.microsoft.com/en-us/library/windows/desktop/aa965884%28v=vs.85%29.aspx) 

> 
> Registry virtualization is an application compatibility technology
>  that enables registry write operations that have global impact to be
>  redirected to per-user locations. This redirection is transparent to
>  applications reading from or writing to the registry. It is supported
>  starting with Windows Vista.
> 
> 
> **Virtualization Overview**
> 
> 
> Prior to Windows Vista, applications were
>  typically run by administrators. As a result, applications could
>  freely access system files and registry keys. If these applications
>  were run by a standard user, they would fail due to insufficient
>  access rights. Windows Vista and later versions of Windows improve
>  application compatibility for these applications by automatically
>  redirecting these operations. For example, registry operations to the
>  global store (HKEY\_LOCAL\_MACHINE\Software) are redirected to a
>  per-user location within the user's profile known as the virtual store
>  (HKEY\_USERS\\_Classes\VirtualStore\Machine\Software).
> 
> 
>
2. Yes it is exactly as it should be.
3. Either live with Virtualization if you want to write to globally impacting location, or use more localised locations if you don't want it. Either way it's invisible to the reader, so don't worry about it.