在Windows上检测/重定向核心转储(当软件崩溃时) [英] Detect/Redirect core dumps (when a software crashes) on Windows

查看:202
本文介绍了在Windows上检测/重定向核心转储(当软件崩溃时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的工作,我需要创建一个服务来检测异常的程序终止,并且不向用户显示消息(默认行为),将生成的核心转储发送到远程服务器。

For my work, I need to create a service that will detect an abnormal program termination and, instead of displaying a message to the user (default behavior), send the generated core dump to a remote server.

我很确定这可以做,但我绝对没有线索从哪里开始。 这是否有任何API /注册表设置?

I'm pretty sure this can be done, but I have absolutely no clue on where to start. Is there any API/registry settings for this ?

谢谢。

推荐答案

一种方法是安装未处理的异常过滤器,然后写一个minidump ,然后你可以上传到你选择的某个地方。我不会完全忽视Windows错误报告 - 这是一个除了你自己的崩溃报告。如果您的应用程序是为了公开发布,那么注册Windows错误报告是非常有价值的,因为您获得有关哪些崩溃用户在野外遇到崩溃,以及当崩溃已修复,您可以添加响应代码,以指向新版本或其他相关信息。

One method is to install an Unhandled Exception Filter and then write a minidump from it which you can then upload to some place of your choosing. I wouldn't totally disregard Windows Error Reporting -- that's an addition to any crash reporting of your own. If your application is for public release then registering for Windows Error Reporting is well worthwhile as you get information about which crashes users are encountering in the wild and when crashes have been fixed you can add a response code to point them to a new version or other relevant information.

根据您的组织中部署应用程序的方式,另一个可能有用的工具是运行 Adplus 在用户的机器上,将收集崩溃转储。

Another tool that may be useful depending on how your application is deployed in your organisation is to run Adplus on a user's machine which will collect together crash dumps. This is more useful for one-off crashes that seem to affect an individual user but aren't reproducible in a development environment.

其他一些有用的链接:

  • http://www.debuginfo.com/articles/effminidumps.html - some useful sample code
  • http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx

这篇关于在Windows上检测/重定向核心转储(当软件崩溃时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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