Example #1
0
 public MemoryHexViewModel(ProcessViewModel process, MemoryRegionViewModel region, SafeWaitHandle hProcess, IUIServices ui)
 {
     Icon      = "/icons/memory-info.ico";
     Text      = $"Memory - {process.Name} ({process.Id}): 0x{region.Address:X}";
     _hProcess = hProcess;
     _region   = region;
     _ui       = ui;
 }
        public MemoryMapViewModel(ProcessViewModel process, DriverInterface driver, IList <TabItemViewModelBase> tabs, IUIServices ui)
        {
            _process  = process;
            _tabs     = tabs;
            _ui       = ui;
            _hProcess = driver.OpenProcessHandle(ProcessAccessMask.AllAccess, process.Id);
            if (_hProcess == null)
            {
                throw new Win32Exception(Marshal.GetLastWin32Error());
            }

            _memoryMap = new MemoryMap(_hProcess);

            Text = $"Map - {process.Name} ({process.Id})";
            Icon = "/icons/memory.ico";
        }