184 |
reader.ReadProcess = this.AcceptedProcess; |
reader.ReadProcess = this.AcceptedProcess; |
185 |
reader.OpenProcess(); |
reader.OpenProcess(); |
186 |
int bytesReadSize; |
int bytesReadSize; |
187 |
reader.DumpMemory(filename, (uint)start, count, out bytesReadSize); |
if (reader.DumpMemory(this.AcceptedProcess,filename, (uint)start, count, out bytesReadSize)) |
188 |
|
{ |
189 |
|
MessageBox.Show(string.Format("Succefully dumped memory (0x{0:x8}-0x{1:x8}) from pid=({3}) to file {2}", start, start + count, filename, string.Format("0x{0:x4} {1}.exe", this.AcceptedProcess.Id, AcceptedProcess.ProcessName)), "", MessageBoxButtons.OK, MessageBoxIcon.Information); |
190 |
|
} |
191 |
|
else |
192 |
|
{ |
193 |
|
MessageBox.Show(string.Format("Failed to dump memory (0x{0:x8}-0x{1:x8}) from pid=({3}) to file {2}", start, start + count, filename, string.Format("0x{0:x4} {1}.exe", this.AcceptedProcess.Id, AcceptedProcess.ProcessName)), "", MessageBoxButtons.OK, MessageBoxIcon.Error); |
194 |
|
} |
195 |
reader.CloseHandle(); |
reader.CloseHandle(); |
196 |
} |
} |
197 |
#endregion |
#endregion |