title: How would I get the base address of a process and edit that pointer with it?
body: <p>I thought base addresses where meant to be like <strong>0x00</strong> but when i use a button to give me the base address i get this <strong>1966604288</strong>. I'm using the Vam Memory DLL. The problem might also be i dont know how to use ida to get memory addresses..
  Note: I've tried kernel32.dll and user32.dll</p>
  
  <pre><code>
  
  
  
  
          public IntPtr GetModuleBaseAddress(string processName, string moduleName)
          {
  
              Process process;
  
              try
              {
                  process = Process.GetProcessesByName(processName)[0];
              }
  
              catch (IndexOutOfRangeException)
              {
  
                  throw new ArgumentException($"No process with name {processName} is currently running");
              }
  
  
  
              var module = process.Modules.Cast&lt;ProcessModule&gt;().SingleOrDefault(m =&gt; string.Equals(m.ModuleName, moduleName, StringComparison.OrdinalIgnoreCase));
  
  
              return module?.BaseAddress ?? IntPtr.Zero;
          }
  
  
  
  
  
  
          private void button3_Click(object sender, EventArgs e)
          {
              vam.processName = "the process im using";
              IntPtr baseaddy = GetModuleBaseAddress("the process im using", "user32.dll");
              int addy = 0xFD1117;
              vam.WriteInt32((IntPtr)baseaddy + addy, 1000);
              richTextBox1.Text = baseaddy.ToString();
          }
      }
  }
  
  
  
  </code></pre>
  
  <p>That's not all my code but it should be enough.</p>