You have no idea of what you are doing. It makes no sense at all. The addresses of different processes are totally isolated, and each process runs in its own address space. One process can report, say, some variable address to another process, and in that process that address can be address of completely different object, physically different or be not a valid address. What you do is totally useless.
[EDIT]
The question is: how can your cheating engine work? There is are special "holes" in the isolation of the process memory space, designed for different purposes, such as debugging.
You can access the process memory using the Windows API
ReadProcessMemory
or
WriteProcessMemory
:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680553%28v=vs.85%29.aspx[
^],
http://msdn.microsoft.com/en-us/library/windows/desktop/ms681674%28v=vs.85%29.aspx[
^].
This is a very different from what you are trying to do. You never have any common point in the memory spaces and you cannot use the remote process memory throw a pointer in your memory space. The memory is only copied to or from some buffer in the caller's memory space.
For more information of this topic, please see the API set "Process Functions for Debugging":
http://msdn.microsoft.com/en-us/library/windows/desktop/ms680549%28v=vs.85%29.aspx[
^].
And the wider set "Debugging Functions":
http://msdn.microsoft.com/en-us/library/windows/desktop/ms679303%28v=vs.85%29.aspx[
^].
—SA