调用非托管DLL时vshost32.exe崩溃 [英] vshost32.exe crash when calling unmanaged DLL

查看:636
本文介绍了调用非托管DLL时vshost32.exe崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS 2005应用程序与非托管(Fortran)DLL进行接口。当我从命令行直接运行编译的可执行文件时,一切都很好 - 可以访问DLL,我可以使用DLL中的函数。

I'm using a VS 2005 app to interface against an unmanaged (Fortran) DLL. When I run the compiled executable straight from the command line, everything is fine - the DLL can be accessed, and I can work with the functions in the DLL.

不幸的是,当我从VS 2005启动应用程序时,我得到一个弹出窗口,指出vshost32.exe已停止工作,没有有用的调试信息。

Unfortunately, when I launch the app from VS 2005, I get a popup stating "vshost32.exe has stopped working" and no useful debugging information.

有没有人经历过这种行为,知道为什么会发生这种情况吗?我不知道为什么在单机启动时运行正常,但不能通过vshost32运行。

Has anyone experienced this behavior, or know why this might be occuring? I can't figure out why it would run fine when launched stand-alone, but not via vshost32.

(最后一个注意事项:我正在使用.local文件强制注册的dll用于cwd,但是这个特定的dll没有注册,我只是在这里注明,以防它有帮助。)

(One last note: I am using .local files to force registered dlls to be used from cwd, but this particular dll is not registered. I'm just noting it here in case it helps.)

非常感谢

Mike

推荐答案

我有vshost32.exe的崩溃问题,当我选中复选框时,问题消失了:

I had problem with crashes of vshost32.exe the problem vanished when I checked the checkbox:

属性 - >调试 - >启用非托管代码调试

是否适合您?

编辑:在更新的版本中,该选项被调用:启用本地代码调试(感谢Qwerty01)

In more recent versions the option is called: Enable native code debugging (thanks Qwerty01)

编辑:似乎也有助于VS2008(@Deacon Frost),VS2010(@Alxandr)。

It also seems to help in VS2008 (@Deacon Frost), VS2010 (@Alxandr).

这篇关于调用非托管DLL时vshost32.exe崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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