如何知道C ++代码在C#代码中崩溃的位置? [英] How to know where the C++ DLL crashed in C# code ?

查看:162
本文介绍了如何知道C ++代码在C#代码中崩溃的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的C#项目中,我们使用了c ++ dll。这些dll工作正常但有时这些dll崩溃了。此崩溃是从 Windows日志事件中识别出来的。



我的问题是dll崩溃的原因以及为什么dll会崩溃。



我尝试了什么:



当dll崩溃时,我们将在我的代码中使用的方法之一中获得异常。



这里的事情只是错误会在dll崩溃时出现或者是否存在任何可能性?

In our project in C# and we used c++ dlls. These dlls are working fine but some times these dlls crashed. This crash is identified from Windows logs events.

My question is where the dll is crashed and why the dll is crashed .

What I have tried:

when dll crashed, we will get exception in one of methods used in my code.

Here thing is only error will come time while dll crashes or is there any possiblity ??

推荐答案

我假设你有调试 - 版本的dll和相应的pdb



然后



启动你的exe而不连接调试器

在visual studio中加载你的dll项目并将调试器附加到启动过程 - 调试工作正常这样



------ -------------------------------------------------- ---------------------



存在崩溃处理程序,他们可以走混合托管和非托管堆栈码。

但是只有你有你需要的调试信息。

google help ...
i assume you have the debug-version of the dll and the corresponding pdb

then

start your exe without debugger attached
in visual studio you load your dll-project and attaching the debugger to the started process - debugging works fine this way

-----------------------------------------------------------------------------

there exist crashhandlers they can walk the stack of mixed managed and unmanaged code.
but only if you have the debug information you need.
google helps...


这篇关于如何知道C ++代码在C#代码中崩溃的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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