System.Windows.Forms.IDataObject dataObject = System.Windows.Forms.Clipboard.GetDataObject();
dataObject.GetDataPresent(clipFormatName);
Object data = dataObject.GetData(clipFormatName);
System.IO.MemoryStream dataStream = data as System.IO.MemoryStream;
data = null;
dataStream.Dispose();
dataStream = null;
然后打开一个窗口,该窗口有许多的textbox combox和 numeriupdown控件,然后他报告See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)这个问题是随机发生的,我肯定和窗口是没有关系的,肯定和剪贴板和MemoryStream的操作导致的,尤其是同一时间重复操作剪贴板,这个问题就跟加容易发生,大虾们怎么解决?谢谢!
dataObject.GetDataPresent(clipFormatName);
Object data = dataObject.GetData(clipFormatName);
System.IO.MemoryStream dataStream = data as System.IO.MemoryStream;
data = null;
dataStream.Dispose();
dataStream = null;
然后打开一个窗口,该窗口有许多的textbox combox和 numeriupdown控件,然后他报告See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)这个问题是随机发生的,我肯定和窗口是没有关系的,肯定和剪贴板和MemoryStream的操作导致的,尤其是同一时间重复操作剪贴板,这个问题就跟加容易发生,大虾们怎么解决?谢谢!
解决方案 »
- 一个透明,鼠标穿透 等问题的一个窗口问题。
- ezVidC60控件来捕获多摄像头问题
- 清除webbrowser document 内容
- 如何列出文件夹下所有子文件夹和文件
- 怎么将Form中gdatagrid中选中行(绑定数据库A表)的数据修改后,点击修改按牛后修改数据库中A表中的同条记录
- JS和C#这俩种怎么样实现动态新闻
- 如何在PictureBox.Image=Image.FromFile(strFileName)之后,有什么方法可以把该strFileName文件删除,因为每次删除总是提示被其它过程占
- 请问如何在矩形区域正中打印出字符串??
- 急!excel数据导入问题
- c#连接mysql的问题请教,各位帮忙啊~~项目很紧。。
- 如何将所有的RadioButton的checked属性变成false?
- DirectX简单应用问题
dataStream 干什么用了?