Search code examples
c#memoryhandlereadprocessmemory

Getting process main entry C#


I'm currently making a memory scanner using C#. Therefore I want to determine the process' main memory entry point (often 0x400000 for x32). I have already opened a pHandle with all acces. How do I get the start address to scan?


Solution

  • ProcessModule.EntryPoint

    // Get the main module associated with 'myProcess'.
    myProcessModule = myProcess.MainModule;
    IntPtr MainEntry = myProcessModule.EntryPointAddress;