title: Get base address of process
body: <p>I want to access a certain address of a process. But for that i need to get the base address of the process first. I'm using a tool to see if i'm actually doing it right. The tool shows i need the following: <code>"app.exe"+0x011F9B08 = 0x119F8300</code></p>
  
  <p>I thought i could obtain the base address of a process through <code>OpenProcess()</code>, but that gives me: <code>0x0000005c</code> as a result. I don't think that is right? Atleast, not what i need.</p>
  
  <p>I think the base address i need is: <code>0x119F8300 - 0x011F9B08 = 0x107FE7F8 &lt;-- base?</code></p>
  
  <p>This is my code:</p>
  
  <pre><code>hWindow = FindWindow(NULL, lpWindowName);
  if(hWindow)
  {
      GetWindowThreadProcessId(hWindow, &amp;dwProcId);
      if(dwProcId != 0)
      {
              // hProcHandle -&gt; 0x0000005c
              hProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcId);
      }
      else
      {
          return 0;
      }
  }
  </code></pre>
  
  <p>How can i get the base address of the process that i've opened?</p>