捕获和删除内存转储 [英] Capture and delete Memory Dumps

查看:86
本文介绍了捕获和删除内存转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开展一个项目,在这个项目中,我必须阅读Memory Dumps的大小并删除它们。我试图从注册管理机构获取路径,但它给出了找不到文件的错误,在这件事情上我需要你的帮助。有没有任何方法可以检测'Memory Dumps'并删除那些'Memory Dumps'。如果有任何方法,请帮助我。



这是我尝试的代码片段

Hi,
I am working on a project in which I have to read the size on 'Memory Dumps' and also remove these. I tried to get the path from registries but it giving error of "File not found" , in this thing I need your help. Is there any method to detect 'Memory Dumps' and remove those 'Memory Dumps'. If there is any way then please help me.

This is the code snippet which I tried

RegistryKey dump = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\CrashControl");
            string MiniDump=Path.GetFileName( Path.GetFullPath(dump.GetValue("MinidumpDir").ToString()));
            string mini = Path.GetFileName(Path.GetFileName(Path.GetFullPath(dump.GetValue("MinidumpDir").ToString())));
            string DumpFile = Path.GetFileName(Path.GetFullPath(dump.GetValue("DumpFile").ToString()));
            FileInfo fd = new FileInfo(Path.GetFileName(Path.GetFullPath(dump.GetValue("MinidumpDir").ToString())));



谢谢。


Thank you.

推荐答案

请参阅 http://support.microsoft.com/kb/254649 [ ^ ]。


这篇关于捕获和删除内存转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆