错误:用户代码未处理Accessviolation异常 [英] Error:Accessviolation Exception was unhandled by user code

查看:296
本文介绍了错误:用户代码未处理Accessviolation异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有这个感觉,VS崩溃了.下面是代码;

Hello All,


I have got this eception and VS get crashed.Below is code;

Preview  pv= new Preview();
pv.Owner = App.Current.Windows[0];
pv.cmbName.IsEnabled = true;
pv.ShowDialog();


在粗体字处显示错误,并显示以下详细信息:尝试读取或写入受保护的内存.这通常表明其他内存已损坏.
有什么建议吗?

感谢


got error at bold area with details: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Any suggestions?

Thanks

推荐答案

该异常发生在Preview类的某个位置.你有它的源代码吗?查看Form_Load和Form_Shown事件处理程序.那里的某个地方,对非托管资源的调用失败.您使用哪个DllImports?您是否检查了参数的编组?
The exception happens somewhere in the Preview class. Do you have its source code? Look at the Form_Load and Form_Shown event handlers. Somewhere there, a call to an unmanaged resource fails. Which DllImports do you use? Did you check the Marshalling of the parameters?


这篇关于错误:用户代码未处理Accessviolation异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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