Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get full memory dump of RAM using c#

How to get Complete Memory Dump using C#.NET?

like image 267
kuhajeyan Avatar asked Jan 20 '26 23:01

kuhajeyan


1 Answers

The only safe way to do it is to cause a bluescreen and have Windows get the dump itself. Causing a bluescreen happens through KeBugCheckEx kernel function and you need a custom-built device driver to call it programmatically. Or you can use CrashOnCtrlScroll registry trick and trigger it yourself.

Or you can connect a kernel debugger to the system using two computers and trigger a memory dump using .crash debugger command.

There are methods like LiveKD from SysInternals to do partial kernel inspection on the same computer but they are not "accurate" because memory changes continuously. It's impossible to get a healthy dump using those methods.

Doing all these using C# is, pointless.

like image 70
Sedat Kapanoglu Avatar answered Jan 23 '26 21:01

Sedat Kapanoglu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!