在 Windows 上检测/重定向核心转储(当软件崩溃时)
对于我的工作,我需要创建一个服务来检测异常程序终止,而不是向用户显示消息(默认行为),而是将生成的核心转储发送到远程服务器。
我很确定这是可以做到的,但我完全不知道从哪里开始。 是否有任何 API/注册表设置?
谢谢。
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.
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 ?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一种方法是安装未处理的异常筛选器 然后编写小型转储然后您可以将其上传到您选择的某个位置。我不会完全忽视 Windows 错误报告——这是对您自己的任何崩溃报告的补充。如果您的应用程序是公开发布的,那么注册 Windows 错误报告是非常值得的,因为您可以获得有关用户在野外遇到的崩溃的信息,并且当崩溃已修复时,您可以添加响应代码以将他们指向新版本或其他版本相关信息。
根据应用程序在组织中的部署方式,另一个可能有用的工具是运行 Adplus在用户的计算机上,它将收集故障转储。这对于似乎影响单个用户但在开发环境中无法重现的一次性崩溃更有用。
其他一些有用的链接:
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.
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.
Some other useful links:
看来我的问题要么是显而易见的,要么是愚蠢的(两者都是?),但无论如何,经过一些研究,我发现了一些有趣的页面。
以下是我发现有用的链接:
It seems my question was either obvious or stupid (both ?) but anyway, i found some interesting pages after some researches.
Here are the links I found useful: