private void DumpModule(IntPtr moduleHandle, ImageLayout imageLayout, string filePath) { using var dumper = DumperFactory.GetDumper(_process.Id, _dumperType.Value); bool result = dumper.DumpModule(moduleHandle, imageLayout, filePath); MessageBoxStub.Show(result ? $"Dump module successfully. Image was saved in:{Environment.NewLine}{filePath}" : "Fail to dump module.", result ? MessageBoxIcon.Information : MessageBoxIcon.Error); }
private void DumpModule(IntPtr moduleHandle, ImageLayout imageLayout, string filePath) { bool result; using (IDumper dumper = DumperFactory.GetDumper(_process.Id, _dumperCore.Value)) result = dumper.DumpModule(moduleHandle, imageLayout, filePath); MessageBoxStub.Show(result ? $"{_resources.GetString("StrDumpModuleSuccessfully")}{Environment.NewLine}{filePath}" : _resources.GetString("StrFailToDumpModule"), result ? MessageBoxIcon.Information : MessageBoxIcon.Error); }