title: Can I get String from memory of another program?
body: <p>Thanks for help in advance.</p>
  
  <p>I already know how to find memory addresses for numerical values and read\write them in ram. (using C#).
  What I want to do is the same for any text in any program. But I don't know if it's even possible.</p>
  
  <p>So for instance, can I access opened notepad.exe memory to extract String which written inside of it?
  Right now I am doing this and it returns garbage:</p>
  
  <pre><code>Process process = Process.GetProcessesByName("notepad").FirstOrDefault();
  String stringaddress = "00401110";
  int address = int.Parse(stringaddress, NumberStyles.HexNumber);
  int bytesRead;
  byte[] value = MemoryAccess.ReadMemory(process, address, 2000000, out bytesRead);
  byte[] buf = Encoding.Convert(Encoding.GetEncoding("iso-8859-1"), 
                                  Encoding.UTF8, value);
  int count = buf.Length;
  String tempString = Encoding.UTF8.GetString(buf, 0, count);
  </code></pre>
  
  <p>What I finally want is to be able to find specific window in program and copy all the text inside of it.</p>