捕获和删除内存转储

编程入门 行业动态 更新时间:2024-10-14 18:20:56
本文介绍了捕获和删除内存转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开展一个项目,在这个项目中,我必须阅读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.

推荐答案

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

更多推荐

捕获和删除内存转储

本文发布于:2023-11-13 02:28:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583171.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内存

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!