Looking for a variable inside another programs memory
<p>Im trying to find a int inside another programs memory (my own little c++ that only holds that variable). The value is 1234, but i cant seem to find it :-(</p>

<p>Ill post what im doing </p>

<pre><code>            for (uint adr = 0x00000000; adr &lt;= 0x7FFFFFFF; adr += 1)
            {
                // we want status...
                uint progress = (adr*100) / 0x7FFFFFFF;
                Console.WriteLine("Progress: {0} %", progress);

                // look for a int
                IntPtr bytes;
                byte[] buffer = new byte[4];

                ReadProcessMemory(process, adr, buffer, 4, out bytes);

                if (BitConverter.ToInt32(buffer, 0) == 1234)
                {
                    // we found it...
                }
            }
</code></pre>

<p>There are several errors, for 1 the progress does not work and i never get a hit on found. Help someone? :D</p>
