本文介绍了Mozilla ActiveX控件和Windows Vista的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我们在ActiveX和Windows Vista上遇到了一个奇怪的问题.

情况:
我们有一个包含"Mozilla ActiveX控件"的C#应用​​程序.在Windows XP和Windows Vista下运行良好.现在,我们在测试PC上更改了Vista-Image,但它不起作用.错误消息显示:

--------------------------------------- -
System.AccessViolationException:尝试读取或写入受保护的内存.这通常表明其他内存已损坏.
在System.Windows.Forms.AxHost处
在System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid&clsid,Object punkOuter,Int32 context,Guid&iid)
.System.Windows.Forms.AxHost.CreateWithLicense(字符串许可证,Guid clsid)的.CreateWithoutLicense(Guid clsid)
在System.Windows的System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
System.Windows.Forms.AxHost.GetOcxCreate()
的System.Windows.Forms.AxHost.TransitionUpTo(Int32状态)
的System.Windows.Forms的.Forms.AxHost.CreateInstance()
在System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
处的AxHost.CreateHandle()
在System.Windows.Forms.Control处System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
处的AxHost.CreateHandle()
.CreateControl(布尔值fIgnoreVisible)
在System.Windows.Forms.Control.CreateControl()在System.Windows.Forms.Control.WmShowWindow(Message& m)在System.W indows.Forms.Control.WndProc(Message& m.
在System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在System.Windows.Forms.ContainerControl.WndProc(Message& m)
在System.Windows.Forms.Form.在System.Windows.Forms.Form.WndProc(Message& m)
处的WmShowWindow(Message& m)
在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m)
中的WmShowWindow(Message& m)
Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)

...
----------------------------------------

我做什么已经完成:


1.
我读了许多关于通过添加Post-build事件来设置NX-Bit的事情,并做到了:
--------
REM将项目标记为DEP不兼容
调用"$(DevEnvDir).. \ .. \ VC \ bin \ vcvars32.bat",调用"$(DevEnvDir)". \ .. \ VC \ bin \ editbin.exe" /NXCOMPAT:否" $(TargetPath)"
--------

但它并没有改变任何事情.

奇怪的事情:
如果我采用.exe并尝试将其排除在数据执行保护之外,则有可能.
但是,如果我使用此.exe和尝试排除此* installed.exe以进行数据执行保护,它表示此程序必须在启用了数据执行保护(DEP)的情况下运行.您不能为此程序关闭DEP."
这是我的问题吗?




2.
我读到有关.NET的修补程序,该修补程序应该解决问题.下载所有可用的错误修复程序后,它没有改变.


还有其他建议吗?

我的环境:
构建PC:Windows XP,Visual Studio 2005 SP 1

测试PC:Windows Vista商业版


Hello,

we have a strange problem with ActiveX and Windows Vista.

The situation:
We have a C#-application with the 'Mozilla ActiveX Control' included. It worked fine under Windows XP and Windows Vista. Now we changed the Vista-Image on our test PC and it doesn't work. The error message says:

----------------------------------------
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
   at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
   at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
   at System.Windows.Forms.AxHost.CreateInstance()
   at System.Windows.Forms.AxHost.GetOcxCreate()
   at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   at System.Windows.Forms.AxHost.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.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)

...
----------------------------------------

What I have already done:
 

1.
I read many things about setting the NX-Bit by adding Post-build event and did it:
--------
REM Mark project as DEP Noncompliant

call "$(DevEnvDir)..\..\VC\bin\vcvars32.bat"

call "$(DevEnvDir)..\..\VC\bin\editbin.exe" /NXCOMPAT:NO "$(TargetPath)"
--------

But it didn't change a thing.

Strange thing:
If I take the .exe and try to exclude it for the Data Execution Prevention, it is possible.
However, if I build a msi-installer with this .exe and try to exclude this *installed* .exe for the Data Execution Prevention, it says "This program must run with data execution protection (DEP) enabled. You cannot turn off DEP for this program."
Is this my problem?




2.
I read about a hotfix of .NET, which should resolve the problem. After downloading ALL available bugfixes it didn't change a thing.


Any other suggestions?


My Environment:
Build PC: Windows XP, Visual Studio 2005 SP 1

Test PC: Windows vista Business

Thanks

推荐答案

祝您度过愉快的一天!


这篇关于Mozilla ActiveX控件和Windows Vista的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:58