private int GetImageSize(IntPtr base_address) { if (!Win32NativeMethods.GetModuleInformation(Handle, base_address, out MODULEINFO mod_info, Marshal.SizeOf(typeof(MODULEINFO)))) { throw new SafeWin32Exception(); } return(mod_info.SizeOfImage); }
private int GetImageSize(IntPtr base_address) { if (!Win32NativeMethods.GetModuleInformation(Handle, base_address, out MODULEINFO mod_info, Marshal.SizeOf(typeof(MODULEINFO)))) { throw new SafeWin32Exception(); } return(mod_info.SizeOfImage); }