Exemple #1
0
        public static Tuple <IntPtr, IntPtr> GetAddressRange(Process program, string asmName)
        {
            Module64 module = program.Module64(asmName);

            if (module != null)
            {
                return(new Tuple <IntPtr, IntPtr>(module.BaseAddress, module.BaseAddress + module.MemorySize));
            }
            return(new Tuple <IntPtr, IntPtr>(IntPtr.Zero, IntPtr.Zero));
        }
Exemple #2
0
 public static Module64 Module64(this Process p, string moduleName)
 {
     Module64[] modules = p.Modules64();
     if (modules != null)
     {
         for (int i = 0; i < modules.Length; i++)
         {
             Module64 module = modules[i];
             if (module.Name.Equals(moduleName, StringComparison.OrdinalIgnoreCase))
             {
                 return(module);
             }
         }
     }
     return(null);
 }